From: Yasunori Goto Date: Fri, 10 Mar 2006 01:33:51 +0000 (-0800) Subject: [PATCH] memory hotadd: pgdat->node_present_pages fix X-Git-Tag: v2.6.16-rc6~33 X-Git-Url: http://pilppa.com/gitweb/?a=commitdiff_plain;h=f2937be5895dbae23ff66767a2fc17793e63159c;p=linux-2.6-omap-h63xx.git [PATCH] memory hotadd: pgdat->node_present_pages fix 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). Signed-off-by: Yasunori Goto Cc: Dave Hansen Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- diff --git a/mm/memory_hotplug.c b/mm/memory_hotplug.c index a918f77f02f..1fe76d963ac 100644 --- a/mm/memory_hotplug.c +++ b/mm/memory_hotplug.c @@ -130,6 +130,7 @@ int online_pages(unsigned long pfn, unsigned long nr_pages) onlined_pages++; } zone->present_pages += onlined_pages; + zone->zone_pgdat->node_present_pages += onlined_pages; setup_per_zone_pages_min();