This is a note to let you know that I've just added the patch titled
slub: Avoid use of slub_lock in show_slab_objects()
to the 2.6.37-stable tree which can be found at:
http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary
The filename of the patch is:
slub-avoid-use-of-slub_lock-in-show_slab_objects.patch
and it can be found in the queue-2.6.37 subdirectory.
If you, or anyone else, feels it should not be added to the stable tree,
please let <[email protected]> know about it.
>From 04d94879c8a4973b5499dc26b9d38acee8928791 Mon Sep 17 00:00:00 2001
From: Christoph Lameter <[email protected]>
Date: Mon, 10 Jan 2011 10:15:15 -0600
Subject: slub: Avoid use of slub_lock in show_slab_objects()
From: Christoph Lameter <[email protected]>
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 <[email protected]>
Acked-by: David Rientjes <[email protected]>
Signed-off-by: Christoph Lameter <[email protected]>
Signed-off-by: Pekka Enberg <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
---
mm/slub.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
--- a/mm/slub.c
+++ b/mm/slub.c
@@ -3821,7 +3821,7 @@ static ssize_t show_slab_objects(struct
}
}
- down_read(&slub_lock);
+ lock_memory_hotplug();
#ifdef CONFIG_SLUB_DEBUG
if (flags & SO_ALL) {
for_each_node_state(node, N_NORMAL_MEMORY) {
@@ -3862,7 +3862,7 @@ static ssize_t show_slab_objects(struct
x += sprintf(buf + x, " N%d=%lu",
node, nodes[node]);
#endif
- up_read(&slub_lock);
+ unlock_memory_hotplug();
kfree(nodes);
return x + sprintf(buf + x, "\n");
}
Patches currently in stable-queue which might be from [email protected] are
queue-2.6.37/slub-avoid-use-of-slub_lock-in-show_slab_objects.patch
queue-2.6.37/mm-page-allocator-adjust-the-per-cpu-counter-threshold-when-memory-is-low.patch
_______________________________________________
stable mailing list
[email protected]
http://linux.kernel.org/mailman/listinfo/stable