Let's use the new mechanism to merge system ram resources below the
root. We are the only one hotplugging system ram, e.g., DIMMs don't apply,
so this is safe to be used.

Cc: Andrew Morton <a...@linux-foundation.org>
Cc: Michal Hocko <mho...@suse.com>
Cc: "K. Y. Srinivasan" <k...@microsoft.com>
Cc: Haiyang Zhang <haiya...@microsoft.com>
Cc: Stephen Hemminger <sthem...@microsoft.com>
Cc: Wei Liu <wei....@kernel.org>
Cc: Pankaj Gupta <pankaj.gupta.li...@gmail.com>
Cc: Baoquan He <b...@redhat.com>
Cc: Wei Yang <richardw.y...@linux.intel.com>
Signed-off-by: David Hildenbrand <da...@redhat.com>
 drivers/hv/hv_balloon.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/drivers/hv/hv_balloon.c b/drivers/hv/hv_balloon.c
index 32e3bc0aa665a..49a6305f0fb73 100644
--- a/drivers/hv/hv_balloon.c
+++ b/drivers/hv/hv_balloon.c
@@ -745,6 +745,9 @@ static void hv_mem_hot_add(unsigned long start, unsigned 
long size,
                        has->covered_end_pfn -=  processed_pfn;
                        spin_unlock_irqrestore(&dm_device.ha_lock, flags);
+               } else {
+                       /* Try to reduce the number of system ram resources. */
+                       merge_system_ram_resources(&iomem_resource);

Virtualization mailing list

Reply via email to