Re: [patch 08/10] SLUB: Optional fast path using cmpxchg_local

Christoph Lameter
2007-10-30T18:58:28Z

On Tue, 30 Oct 2007, Andrew Morton wrote:

> Let's cc linux-arch: presumably other architectures can implement cpu-local
> cmpxchg and would see some benefit from doing so.

Matheiu had a whole series of cmpxchg_local patches. Ccing him too. I
think he has some numbers for other architectures.

> The semantics are "atomic wrt interrutps on this cpu, not atomic wrt other
> cpus", yes?

Right.

> Do you have a feel for how useful it would be for arch maintainers to implement
> this? IOW, is it worth their time?

That depends on the efficiency of a cmpxchg_local vs. the interrupt
enable/ disable sequence on a particular arch. On x86 this yields about
50% so it doubles the speed of the fastpath. On other architectures the
cmpxchg is so slow that it is not worth it (ia64 f.e.)