Function show_mem() is used to print system memory status when user requires or fail to allocate memory. Generally, this is a best effort information and not willing to affect core mm subsystem. The data protected by pgdat_resize_lock is mostly correct except there is: * page struct defer init * memory hotplug Signed-off-by: Wei Yang <richard.weiyang@xxxxxxxxx> --- lib/show_mem.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/lib/show_mem.c b/lib/show_mem.c index 0beaa1d899aa..1d996e5771ab 100644 --- a/lib/show_mem.c +++ b/lib/show_mem.c @@ -21,7 +21,6 @@ void show_mem(unsigned int filter, nodemask_t *nodemask) unsigned long flags; int zoneid; - pgdat_resize_lock(pgdat, &flags); for (zoneid = 0; zoneid < MAX_NR_ZONES; zoneid++) { struct zone *zone = &pgdat->node_zones[zoneid]; if (!populated_zone(zone)) @@ -33,7 +32,6 @@ void show_mem(unsigned int filter, nodemask_t *nodemask) if (is_highmem_idx(zoneid)) highmem += zone->present_pages; } - pgdat_resize_unlock(pgdat, &flags); } printk("%lu pages RAM\n", total); -- 2.15.1