Skip to contentSkip to conversation

Tiny bug fix of memory hotadd (pgdat->node_present_pages are not correct).

PATCH New Yasunori Goto 1 participant 1 message Mar 9, 2006

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Tiny bug fix of memory hotadd (pgdat->node_present_pages are not correct).

Hello.

This patch is tiny bug fix for memory hotplug.

When pages are onlined, not only zone->present_pages but also pgdat->node_present_pages should be refreshed.

This parameter is used to show information at
/sys/device/system/node/nodeX/meminfo
via si_meminfo_node().

So, it shows strange value for MemUsed which is calculated (node_present_pages - all zones free pages).

This patch is for 2.6.16-rc5-mm3.
And I tested this on my hotplug emulation environment.

Please apply.

mm/memory_hotplug.c +1 -0
Index: pgdat7/mm/memory_hotplug.c
===================================================================
@@ -130,6 +130,7 @@ int online_pages(unsigned long pfn, unsi
 		onlined_pages++;
 	}
 	zone->present_pages += onlined_pages;
+	zone->zone_pgdat->node_present_pages += onlined_pages;
 
 	setup_per_zone_pages_min();
 
Signature · 1 line
Yasunori Goto