Re: [PATCH] SLUB use cmpxchg_local

Mathieu Desnoyers
2007-08-22T20:09:21Z

* Christoph Lameter (clameter@sgi.com) wrote:
> void *kmem_cache_alloc(struct kmem_cache *s, gfp_t gfpflags)
> @@ -1577,7 +1590,10 @@ static void __slab_free(struct kmem_cach
> {
> void *prior;
> void **object = (void *)x;
> + unsigned long flags;
>
> + local_irq_save(flags);
> + put_cpu_no_resched();

Those two lines may skip a preempt_check.

Could we change them to this instead ?

put_cpu();
local_irq_save(flags);

Otherwise, it would be good to call

preempt_check_resched();

After each local_irq_restore() in this function.

Mathieu