]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/commitdiff
numa slab bugfix added at last minute to queue
authorChris Wright <chrisw@sous-sol.org>
Sat, 22 Mar 2008 01:17:13 +0000 (18:17 -0700)
committerChris Wright <chrisw@sous-sol.org>
Sat, 22 Mar 2008 01:17:13 +0000 (18:17 -0700)
review-2.6.24/series
review-2.6.24/slab-numa-slab-allocator-migration-bugfix.patch [new file with mode: 0644]

index 8345048c8299f6d38c41b46e6949f00287b8ff40..8c3e9d15a46407d2bf0a6c0472b3edd0a2e99c2c 100644 (file)
@@ -74,3 +74,4 @@ async_tx-avoid-the-async-xor_zero_sum-path-when-src_cnt-device-max_xor.patch
 scsi-advansys-fix-bug-in-advloadmicrocode.patch
 bluetooth-fix-bugs-in-previous-conn-add-del-workqueue-changes.patch
 relay-fix-subbuf_splice_actor-adding-too-many-pages.patch
+slab-numa-slab-allocator-migration-bugfix.patch
diff --git a/review-2.6.24/slab-numa-slab-allocator-migration-bugfix.patch b/review-2.6.24/slab-numa-slab-allocator-migration-bugfix.patch
new file mode 100644 (file)
index 0000000..103e574
--- /dev/null
@@ -0,0 +1,54 @@
+From 6d2144d355d2a532e5cc3fc12a6ba2a8d4ef15e4 Mon Sep 17 00:00:00 2001
+From: Joe Korty <joe.korty@ccur.com>
+Date: Wed, 5 Mar 2008 15:04:59 -0800
+Message-ID: <20080322010235.GB29191@tsunami.ccur.com>
+Subject: slab: NUMA slab allocator migration bugfix
+
+NUMA slab allocator cpu migration bugfix
+
+The NUMA slab allocator (specifically, cache_alloc_refill)
+is not refreshing its local copies of what cpu and what
+numa node it is on, when it drops and reacquires the irq
+block that it inherited from its caller.  As a result
+those values become invalid if an attempt to migrate the
+process to another numa node occured while the irq block
+had been dropped.
+
+The solution is to make cache_alloc_refill reload these
+variables whenever it drops and reacquires the irq block.
+
+The error is very difficult to hit.  When it does occur,
+one gets the following oops + stack traceback bits in
+check_spinlock_acquired:
+
+       kernel BUG at mm/slab.c:2417
+       cache_alloc_refill+0xe6
+       kmem_cache_alloc+0xd0
+       ...
+
+This patch was developed against 2.6.23, ported to and
+compiled-tested only against 2.6.25-rc4.
+
+Signed-off-by: Joe Korty <joe.korty@ccur.com>
+Signed-off-by: Christoph Lameter <clameter@sgi.com>
+Signed-off-by: Chris Wright <chrisw@sous-sol.org>
+---
+ mm/slab.c |    5 ++---
+ 1 file changed, 2 insertions(+), 3 deletions(-)
+
+--- a/mm/slab.c
++++ b/mm/slab.c
+@@ -2961,11 +2961,10 @@ static void *cache_alloc_refill(struct k
+       struct array_cache *ac;
+       int node;
+-      node = numa_node_id();
+-
++retry:
+       check_irq_off();
++      node = numa_node_id();
+       ac = cpu_cache_get(cachep);
+-retry:
+       batchcount = ac->batchcount;
+       if (!ac->touched && batchcount > BATCHREFILL_LIMIT) {
+               /*