diff options
author | Joe Korty <joe.korty@ccur.com> | 2008-03-05 18:04:59 -0500 |
---|---|---|
committer | Christoph Lameter <clameter@sgi.com> | 2008-03-06 19:21:50 -0500 |
commit | 6d2144d355d2a532e5cc3fc12a6ba2a8d4ef15e4 (patch) | |
tree | 1c27eecfce86a166ca827bfbd2fe7a46888a7bc0 /mm | |
parent | b6210386787728b84db25adc4f1eba70440a4c73 (diff) |
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>
Diffstat (limited to 'mm')
-rw-r--r-- | mm/slab.c | 5 |
1 files changed, 2 insertions, 3 deletions
@@ -2964,11 +2964,10 @@ static void *cache_alloc_refill(struct kmem_cache *cachep, gfp_t flags) | |||
2964 | struct array_cache *ac; | 2964 | struct array_cache *ac; |
2965 | int node; | 2965 | int node; |
2966 | 2966 | ||
2967 | node = numa_node_id(); | 2967 | retry: |
2968 | |||
2969 | check_irq_off(); | 2968 | check_irq_off(); |
2969 | node = numa_node_id(); | ||
2970 | ac = cpu_cache_get(cachep); | 2970 | ac = cpu_cache_get(cachep); |
2971 | retry: | ||
2972 | batchcount = ac->batchcount; | 2971 | batchcount = ac->batchcount; |
2973 | if (!ac->touched && batchcount > BATCHREFILL_LIMIT) { | 2972 | if (!ac->touched && batchcount > BATCHREFILL_LIMIT) { |
2974 | /* | 2973 | /* |