]> git.ipfire.org Git - people/ms/linux.git/commit
slub: Avoid use of slub_lock in show_slab_objects()
authorChristoph Lameter <cl@linux.com>
Mon, 10 Jan 2011 16:15:15 +0000 (10:15 -0600)
committerGreg Kroah-Hartman <gregkh@suse.de>
Thu, 17 Feb 2011 23:14:37 +0000 (15:14 -0800)
commit8255012e8bec4a02af9a255edcc4478c7222eca7
tree4c7d7ecec196ac81e46e533e5c5d89fc35945083
parente8160e170bc2fb0fa6815f7a89495a2a387b940c
slub: Avoid use of slub_lock in show_slab_objects()

commit 04d94879c8a4973b5499dc26b9d38acee8928791 upstream.

The purpose of the locking is to prevent removal and additions
of nodes when statistics are gathered for a slab cache. So we
need to avoid racing with memory hotplug functionality.

It is enough to take the memory hotplug locks there instead
of the slub_lock.

online_pages() currently does not acquire the memory_hotplug
lock. Another patch will be submitted by the memory hotplug
authors to take the memory hotplug lock and describe the
uses of the memory hotplug lock to protect against
adding and removal of nodes from non hotplug data structures.

Reported-and-tested-by: Bart Van Assche <bvanassche@acm.org>
Acked-by: David Rientjes <rientjes@google.com>
Signed-off-by: Christoph Lameter <cl@linux.com>
Signed-off-by: Pekka Enberg <penberg@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
mm/slub.c