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 <[email protected]>
Cc: Michal Hocko <[email protected]>
Cc: "K. Y. Srinivasan" <[email protected]>
Cc: Haiyang Zhang <[email protected]>
Cc: Stephen Hemminger <[email protected]>
Cc: Wei Liu <[email protected]>
Signed-off-by: David Hildenbrand <[email protected]>
---
 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..0745f7cc1727b 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);
                        break;
+               } else {
+                       /* Try to reduce the number of "System RAM" resources. 
*/
+                       merge_child_mem_resources(&iomem_resource, "System 
RAM");
                }
 
                /*
-- 
2.26.2

Reply via email to