[PATCH v3 2/2] mem-hotplug: Reset node present pages when hot-adding a new pgdat.

2014-11-12 Thread Tang Chen
When memory is hot-added, all the memory is in offline state. So clear all zones' present_pages because they will be updated in online_pages() and offline_pages(). Otherwise, /proc/zoneinfo will corrupt: When the memory of node2 is offline: # cat /proc/zoneinfo .. Node 2, zone Movable

[PATCH v3 2/2] mem-hotplug: Reset node present pages when hot-adding a new pgdat.

2014-11-12 Thread Tang Chen
When memory is hot-added, all the memory is in offline state. So clear all zones' present_pages because they will be updated in online_pages() and offline_pages(). Otherwise, /proc/zoneinfo will corrupt: When the memory of node2 is offline: # cat /proc/zoneinfo .. Node 2, zone Movable