Re: [PATCH] SLUB use cmpxchg_local

Christoph Lameter
2007-08-22T20:38:29Z

Ok so we need this.

Fix up preempt checks.

Signed-off-by: Christoph Lameter <clameter@sgi.com>

---
mm/slub.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)

Index: linux-2.6/mm/slub.c
===================================================================
--- linux-2.6.orig/mm/slub.c 2007-08-22 13:33:40.000000000 -0700
+++ linux-2.6/mm/slub.c 2007-08-22 13:35:31.000000000 -0700
@@ -1469,6 +1469,7 @@ load_freelist:
out:
slab_unlock(c->page);
local_irq_restore(flags);
+ preempt_check_resched();
if (unlikely((gfpflags & __GFP_ZERO)))
memset(object, 0, c->objsize);
return object;
@@ -1512,6 +1513,7 @@ new_slab:
goto load_freelist;
}
local_irq_restore(flags);
+ preempt_check_resched();
return NULL;
debug:
object = c->page->freelist;
@@ -1592,8 +1594,8 @@ static void __slab_free(struct kmem_cach
void **object = (void *)x;
unsigned long flags;

+ put_cpu();
local_irq_save(flags);
- put_cpu_no_resched();
slab_lock(page);

if (unlikely(SlabDebug(page)))