From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id BAF6EC001DE for ; Thu, 13 Jul 2023 14:56:59 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232090AbjGMO46 (ORCPT ); Thu, 13 Jul 2023 10:56:58 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60962 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229494AbjGMO4x (ORCPT ); Thu, 13 Jul 2023 10:56:53 -0400 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A5D99270D for ; Thu, 13 Jul 2023 07:55:59 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1689260158; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding; bh=LptuTpvFDZBRRZm7T2FbpKgVlUR80XdDNd96fLSIzt8=; b=LvrqV1TcRpV+O9JO/Nd+ErK9B3KCZeAxwkot2wDfW1ymwNzHSbiRXDWzY4HtSSFm5OROBU b2KYrZgb38/8AoKBp6ig1F5cUx2VUDMfuoQ9o1AU1wmk9zO33y6PJIPjWK4g80ZQdI2iaL x44/NuuRbnET2gMyOZ/2TsB4e9v8/vQ= Received: from mimecast-mx02.redhat.com (66.187.233.73 [66.187.233.73]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-327-UuHX7QVrOaKiCwlKvKf5PA-1; Thu, 13 Jul 2023 10:55:55 -0400 X-MC-Unique: UuHX7QVrOaKiCwlKvKf5PA-1 Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.rdu2.redhat.com [10.11.54.5]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 45E9E3C0F67B; Thu, 13 Jul 2023 14:55:55 +0000 (UTC) Received: from t14s.redhat.com (unknown [10.39.192.245]) by smtp.corp.redhat.com (Postfix) with ESMTP id 20A28F66CB; Thu, 13 Jul 2023 14:55:53 +0000 (UTC) From: David Hildenbrand To: linux-kernel@vger.kernel.org Cc: linux-mm@kvack.org, virtualization@lists.linux-foundation.org, David Hildenbrand , "Michael S. Tsirkin" , Jason Wang , Xuan Zhuo Subject: [PATCH v1 0/4] virtio-mem: memory unplug/offlining related cleanups Date: Thu, 13 Jul 2023 16:55:47 +0200 Message-ID: <20230713145551.2824980-1-david@redhat.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Scanned-By: MIMEDefang 3.1 on 10.11.54.5 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Some cleanups+optimizations primarily around offline_and_remove_memory(). Patch #1 drops the "unsafe unplug" feature where we might get stuck in offline_and_remove_memory() forever. Patch #2 handles unexpected errors from offline_and_remove_memory() a bit nicer. Patch #3 handles the case where offline_and_remove_memory() failed and we want to retry later to remove a completely unplugged Linux memory block, to not have them waste memory forever. Patch #4 something I had lying around for longer, which reacts faster on config changes when unplugging memory. Cc: "Michael S. Tsirkin" Cc: Jason Wang Cc: Xuan Zhuo David Hildenbrand (4): virtio-mem: remove unsafe unplug in Big Block Mode (BBM) virtio-mem: convert most offline_and_remove_memory() errors to -EBUSY virtio-mem: keep retrying on offline_and_remove_memory() errors in Sub Block Mode (SBM) virtio-mem: check if the config changed before fake offlining memory drivers/virtio/virtio_mem.c | 168 ++++++++++++++++++++++++------------ 1 file changed, 112 insertions(+), 56 deletions(-) base-commit: 3f01e9fed8454dcd89727016c3e5b2fbb8f8e50c -- 2.41.0