[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20200731091838.7490-5-david@redhat.com>
Date: Fri, 31 Jul 2020 11:18:37 +0200
From: David Hildenbrand <david@...hat.com>
To: linux-kernel@...r.kernel.org
Cc: virtualization@...ts.linux-foundation.org, linux-mm@...ck.org,
linux-hyperv@...r.kernel.org, xen-devel@...ts.xenproject.org,
David Hildenbrand <david@...hat.com>,
Andrew Morton <akpm@...ux-foundation.org>,
Michal Hocko <mhocko@...e.com>,
Boris Ostrovsky <boris.ostrovsky@...cle.com>,
Juergen Gross <jgross@...e.com>,
Stefano Stabellini <sstabellini@...nel.org>,
Roger Pau Monné <roger.pau@...rix.com>,
Julien Grall <julien@....org>
Subject: [PATCH RFCv1 4/5] xen/balloon: try to merge "System RAM" resources
Let's reuse the new mechanism to merge "System RAM" resources below the
root. We are the only one hotplugging "System RAM" and DIMMs don't apply,
so this is safe to use.
Cc: Andrew Morton <akpm@...ux-foundation.org>
Cc: Michal Hocko <mhocko@...e.com>
Cc: Boris Ostrovsky <boris.ostrovsky@...cle.com>
Cc: Juergen Gross <jgross@...e.com>
Cc: Stefano Stabellini <sstabellini@...nel.org>
Cc: Roger Pau Monné <roger.pau@...rix.com>
Cc: Julien Grall <julien@....org>
Signed-off-by: David Hildenbrand <david@...hat.com>
---
drivers/xen/balloon.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/drivers/xen/balloon.c b/drivers/xen/balloon.c
index 77c57568e5d7f..644ae2e3798e2 100644
--- a/drivers/xen/balloon.c
+++ b/drivers/xen/balloon.c
@@ -353,6 +353,10 @@ static enum bp_state reserve_additional_memory(void)
if (rc) {
pr_warn("Cannot add additional memory (%i)\n", rc);
goto err;
+ } else {
+ resource = NULL;
+ /* Try to reduce the number of "System RAM" resources. */
+ merge_child_mem_resources(&iomem_resource, "System RAM");
}
balloon_stats.total_pages += balloon_hotplug;
--
2.26.2
Powered by blists - more mailing lists