Re: [PATCH] SLUB use cmpxchg_local

Mathieu Desnoyers
2007-08-27T21:25:56Z

* Christoph Lameter (clameter@sgi.com) wrote:
> I think the simplest solution may be to leave slub as done in the patch
> that we developed last week. The arch must provide a cmpxchg_local that is
> performance wise the fastest possible. On x86 this is going to be the
> cmpxchg_local on others where cmpxchg is slower than interrupt
> disable/enable this is going to be the emulation that does
>
> interrupt disable
>
> cmpchg simulation
>
> interrupt enable
>
>
> If we can establish that this is not a performance regression then we have
> a clean solution source code wise. It also minimizes the interrupt holdoff
> for the non-cmpxchg_local arches. However, it means that we will have to
> disable interrupts twice for the slow path. If that is too expensive then
> we need a different solution.
>

cmpxchg_local is not used on the slow path... ?

Did you meant:

it means that we will have to disable preemption _and_ interrupts on the
fast path for non-cmpxchg_local arches ?

Or maybe am I thinking about the wrong code snippet there ?