Received: by 2002:a25:23cc:0:0:0:0:0 with SMTP id j195csp611413ybj; Thu, 7 May 2020 03:34:09 -0700 (PDT) X-Google-Smtp-Source: APiQypKmzeD3QK3+jdpJCIMS8PNEo9sDy1ct0nkHbhegfT/LHRqrh5t6DZYsSPcME2hf1C3wVTLh X-Received: by 2002:a50:e841:: with SMTP id k1mr11555788edn.245.1588847649718; Thu, 07 May 2020 03:34:09 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1588847649; cv=none; d=google.com; s=arc-20160816; b=JkXNIWgyum8CYZ5uGParCCu2NVjmQx//xmCr0VU978Nwa9fIPDjkBVSK6gGTTwlb9k 8Lb++XFjbpIUgctoJc+9iDVedjaIFZuEmGKrgZTG01CkeVAJBMg+f0F3cztllDPAKYee Gqk6Lzk9WYSlAhtyvJ5WUDpO89v/Y1Kg4ELfrK3ZStL4gZ369RzV2+rtWOGUjO5GNovO 1VYmVpCcXZUElzmCky1Z09pUD4sKPIzJpj7KfO0HysUkAZN1mfXMfpxWSfaMrbtYtdmU 0qBfK0nknKTb/MBsI4kBcaMhVLpZwB2va6W5IFuoP/t/OkUfCNXTDbvRRYQAf5zRubmu zocw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=VLTLF8okWG2U8qocbOPYjuf/W5P0dXVCWo4Nb3iuQAg=; b=EIwcyU3rL4ifIKFqI9gYcn4C8mROPrSwtz2qf9QNREC+uOLGMTf7GqOrS1owZ2xi4O RUIjOkYSPRgdnlUzuKio+pBf15LQyJ5dOrrYKhxtYYpreFkHcydTUUBlKHgB8S3MQuV7 SDD7sQDRxsJctDHBQXjoqR2Kmesw8KnWxU+oq8WBSSKClAiUUDiVxbUtDLZgxfJQGhy/ wKqsllc7aqYn0WzwiUGdsnU7qXl6a4TV8GwIKb6PUhvPqcXFBf4Sik0fSnuH0/Jg7fg/ JXEesno+IAkyWQcdgOMYhGukeF1wJdLsNtIXgGm9xH9UUIew+tR7JnGkeQMgrOAl0scY iVTQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b="HWfo/ttF"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id di13si2751795edb.419.2020.05.07.03.33.45; Thu, 07 May 2020 03:34:09 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b="HWfo/ttF"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726393AbgEGKcB (ORCPT + 99 others); Thu, 7 May 2020 06:32:01 -0400 Received: from us-smtp-2.mimecast.com ([205.139.110.61]:59872 "EHLO us-smtp-delivery-1.mimecast.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1725809AbgEGKcA (ORCPT ); Thu, 7 May 2020 06:32:00 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1588847519; 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=VLTLF8okWG2U8qocbOPYjuf/W5P0dXVCWo4Nb3iuQAg=; b=HWfo/ttFkGYtqRBHinrbWAUXGMYA7twEqvIgY6sK2QxBEj+RZ4RpmJc9xjz2R0/JxN4LWy pDajlhza+8EZBvA75EXp8SdxqZnMtnzbq3JjAab8KLVy2vdzWPbBGCgVfIiJ//1mafUEVg F19+MdELaQO9s0QhrFUa4wEH4Jdecqs= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-228-7KSFfIZuMTWeQ6b4FFHZvw-1; Thu, 07 May 2020 06:31:55 -0400 X-MC-Unique: 7KSFfIZuMTWeQ6b4FFHZvw-1 Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.14]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 0208780183C; Thu, 7 May 2020 10:31:51 +0000 (UTC) Received: from t480s.redhat.com (ovpn-113-245.ams2.redhat.com [10.36.113.245]) by smtp.corp.redhat.com (Postfix) with ESMTP id 8D8415D9C5; Thu, 7 May 2020 10:31:28 +0000 (UTC) From: David Hildenbrand To: linux-kernel@vger.kernel.org Cc: linux-mm@kvack.org, virtio-dev@lists.oasis-open.org, virtualization@lists.linux-foundation.org, kvm@vger.kernel.org, Michal Hocko , Andrew Morton , "Michael S . Tsirkin" , David Hildenbrand , Sebastien Boeuf , Samuel Ortiz , Robert Bradford , Luiz Capitulino , Pankaj Gupta , teawater , Igor Mammedov , "Dr . David Alan Gilbert" , Alexander Duyck , Alexander Potapenko , Anshuman Khandual , Anthony Yznaga , Dan Williams , Dave Young , Jason Wang , Johannes Weiner , Juergen Gross , Konrad Rzeszutek Wilk , Len Brown , Mel Gorman , Michal Hocko , Mike Rapoport , Oscar Salvador , Oscar Salvador , Pavel Tatashin , Pavel Tatashin , Pingfan Liu , Qian Cai , "Rafael J. Wysocki" , "Rafael J. Wysocki" , Stefan Hajnoczi , Vlastimil Babka , Wei Yang Subject: [PATCH v3 00/15] virtio-mem: paravirtualized memory Date: Thu, 7 May 2020 12:31:04 +0200 Message-Id: <20200507103119.11219-1-david@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.14 Content-Transfer-Encoding: quoted-printable Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org This series is based on latest linux-next. The patches are located at: https://github.com/davidhildenbrand/linux.git virtio-mem-v3 Patch #1 - #10 where contained in v2 and only contain minor modifications (mostly smaller fixes). The remaining patches are new and contain smaller optimizations. Details about virtio-mem can be found in the cover letter of v2 [1]. A basic QEMU implementation was posted yesterday [2]. [1] https://lkml.kernel.org/r/20200311171422.10484-1-david@redhat.com [2] https://lkml.kernel.org/r/20200506094948.76388-1-david@redhat.com v2 -> v3: - "virtio-mem: Paravirtualized memory hotplug" -- Include "linux/slab.h" to fix build issues -- Remember the "region_size", helpful for patch #11 -- Minor simplifaction in virtio_mem_overlaps_range() -- Use notifier_from_errno() instead of notifier_to_errno() in notifier -- More reliable check for added memory when unloading the driver - "virtio-mem: Allow to specify an ACPI PXM as nid" -- Also print the nid - Added patch #11-#15 Cc: Sebastien Boeuf Cc: Samuel Ortiz Cc: Robert Bradford Cc: Luiz Capitulino Cc: Pankaj Gupta Cc: teawater Cc: Igor Mammedov Cc: Dr. David Alan Gilbert David Hildenbrand (15): virtio-mem: Paravirtualized memory hotplug virtio-mem: Allow to specify an ACPI PXM as nid virtio-mem: Paravirtualized memory hotunplug part 1 virtio-mem: Paravirtualized memory hotunplug part 2 mm: Allow to offline unmovable PageOffline() pages via MEM_GOING_OFFLINE virtio-mem: Allow to offline partially unplugged memory blocks mm/memory_hotplug: Introduce offline_and_remove_memory() virtio-mem: Offline and remove completely unplugged memory blocks virtio-mem: Better retry handling MAINTAINERS: Add myself as virtio-mem maintainer virtio-mem: Add parent resource for all added "System RAM" virtio-mem: Drop manual check for already present memory virtio-mem: Unplug subblocks right-to-left virtio-mem: Use -ETXTBSY as error code if the device is busy virtio-mem: Try to unplug the complete online memory block first MAINTAINERS | 7 + drivers/acpi/numa/srat.c | 1 + drivers/virtio/Kconfig | 17 + drivers/virtio/Makefile | 1 + drivers/virtio/virtio_mem.c | 1962 +++++++++++++++++++++++++++++++ include/linux/memory_hotplug.h | 1 + include/linux/page-flags.h | 10 + include/uapi/linux/virtio_ids.h | 1 + include/uapi/linux/virtio_mem.h | 208 ++++ mm/memory_hotplug.c | 81 +- mm/page_alloc.c | 26 + mm/page_isolation.c | 9 + 12 files changed, 2314 insertions(+), 10 deletions(-) create mode 100644 drivers/virtio/virtio_mem.c create mode 100644 include/uapi/linux/virtio_mem.h --=20 2.25.3