Skip to content

Commit

Permalink
[PATCH] memory hotadd: pgdat->node_present_pages fix
Browse files Browse the repository at this point in the history
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 <[email protected]>
Cc: Dave Hansen <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
  • Loading branch information
Yasunori Goto authored and Linus Torvalds committed Mar 10, 2006
1 parent 57c432b commit f2937be
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions mm/memory_hotplug.c
Original file line number Diff line number Diff line change
Expand Up @@ -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();

Expand Down

0 comments on commit f2937be

Please sign in to comment.