+ mm-show_mem-drop-pgdat_resize_lock-in-show_mem.patch added to -mm tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



The patch titled
     Subject: lib/show_mem.c: drop pgdat_resize_lock in show_mem()
has been added to the -mm tree.  Its filename is
     mm-show_mem-drop-pgdat_resize_lock-in-show_mem.patch

This patch should soon appear at
    http://ozlabs.org/~akpm/mmots/broken-out/mm-show_mem-drop-pgdat_resize_lock-in-show_mem.patch
and later at
    http://ozlabs.org/~akpm/mmotm/broken-out/mm-show_mem-drop-pgdat_resize_lock-in-show_mem.patch

Before you just go and hit "reply", please:
   a) Consider who else should be cc'ed
   b) Prefer to cc a suitable mailing list as well
   c) Ideally: find the original patch on the mailing list and do a
      reply-to-all to that, adding suitable additional cc's

*** Remember to use Documentation/process/submit-checklist.rst when testing your code ***

The -mm tree is included into linux-next and is updated
there every 3-4 working days

------------------------------------------------------
From: Wei Yang <richard.weiyang@xxxxxxxxx>
Subject: lib/show_mem.c: drop pgdat_resize_lock in show_mem()

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 so any races with memory hotplug (or very theoretically an
early initialization) should be tolerable and the worst that could happen
is to print an imprecise node state.

Drop the resize lock because this is the only place which might hold the
lock from the interrupt context and so all other callers might use a
simple spinlock.  Even though this doesn't solve any real issue it makes
the code easier to follow and tiny more effective.

Link: http://lkml.kernel.org/r/20181129235532.9328-1-richard.weiyang@xxxxxxxxx
Signed-off-by: Wei Yang <richard.weiyang@xxxxxxxxx>
Acked-by: Michal Hocko <mhocko@xxxxxxxx>
Reviewed-by: Oscar Salvador <osalvador@xxxxxxx>
Cc: Johannes Weiner <hannes@xxxxxxxxxxx>
Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx>
---

 lib/show_mem.c |    3 ---
 1 file changed, 3 deletions(-)

--- a/lib/show_mem.c~mm-show_mem-drop-pgdat_resize_lock-in-show_mem
+++ a/lib/show_mem.c
@@ -18,10 +18,8 @@ void show_mem(unsigned int filter, nodem
 	show_free_areas(filter, nodemask);
 
 	for_each_online_pgdat(pgdat) {
-		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 +31,6 @@ void show_mem(unsigned int filter, nodem
 			if (is_highmem_idx(zoneid))
 				highmem += zone->present_pages;
 		}
-		pgdat_resize_unlock(pgdat, &flags);
 	}
 
 	printk("%lu pages RAM\n", total);
_

Patches currently in -mm which might be from richard.weiyang@xxxxxxxxx are

mm-slub-remove-validation-on-cpu_slab-in-__flush_cpu_slab.patch
mm-slub-page-is-always-non-null-for-node_match.patch
mm-slub-record-final-state-of-slub-action-in-deactivate_slab.patch
mm-slub-improve-performance-by-skipping-checked-node-in-get_any_partial.patch
mm-remove-reset-of-pcp-counter-in-pageset_init.patch
vmscan-return-node_reclaim_noscan-in-node_reclaim-when-config_numa-is-n.patch
drivers-base-memoryc-remove-an-unnecessary-check-on-nr_mem_sections.patch
mm-check-nr_initialised-with-pages_per_section-directly-in-defer_init.patch
mm-sparse-drop-pgdat_resize_lock-in-sparse_add-remove_one_section.patch
mm-hotplug-move-init_currently_empty_zone-under-zone_span_lock-protection.patch
mm-show_mem-drop-pgdat_resize_lock-in-show_mem.patch




[Index of Archives]     [Kernel Archive]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]

  Powered by Linux