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

2007-10-30 Thread Mathieu Desnoyers
* Christoph Lameter ([EMAIL PROTECTED]) wrote: > Provide an alternate implementation of the SLUB fast paths for alloc > and free using cmpxchg_local. The cmpxchg_local fast path is selected > for arches that have CONFIG_FAST_CMPXCHG_LOCAL set. An arch should only > set CONFIG_FAST_CMPXCHG_LOCAL if

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

2007-10-30 Thread Mathieu Desnoyers
* Christoph Lameter ([EMAIL PROTECTED]) wrote: > 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

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

2007-10-30 Thread Christoph Lameter
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. >

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

2007-10-30 Thread Andrew Morton
On Sat, 27 Oct 2007 20:32:04 -0700 Christoph Lameter <[EMAIL PROTECTED]> wrote: > Provide an alternate implementation of the SLUB fast paths for alloc > and free using cmpxchg_local. The cmpxchg_local fast path is selected > for arches that have CONFIG_FAST_CMPXCHG_LOCAL set. An arch should only >

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

2007-10-30 Thread Andrew Morton
On Sun, 28 Oct 2007 15:05:50 +0200 (EET) Pekka J Enberg <[EMAIL PROTECTED]> wrote: > On Sat, 27 Oct 2007, Christoph Lameter wrote: > > The alternate path is realized using #ifdef's. Several attempts to do the > > same with macros and in line functions resulted in a mess (in particular due > > to t

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

2007-10-28 Thread Christoph Lameter
On Sun, 28 Oct 2007, Pekka J Enberg wrote: > - local_irq_restore(flags); > + object = do_slab_alloc(s, c, gfpflags, node, addr); > + if (unlikely(!object)) > + goto out; Undoing the optimization that one of the earlier patches added. The #ifdef version is for me at least

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

2007-10-28 Thread Christoph Lameter
On Sun, 28 Oct 2007, Pekka J Enberg wrote: > Can you please write a comment of the locking rules when cmpxchg_local() > is used? Looks as if we could push that local_irq_save() to slub_lock() > and local_irq_restore() to slub_unlock() and deal with the unused flags > variable for the non-CONFIG

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

2007-10-28 Thread Pekka J Enberg
On Sat, 27 Oct 2007, Christoph Lameter wrote: > The alternate path is realized using #ifdef's. Several attempts to do the > same with macros and in line functions resulted in a mess (in particular due > to the strange way that local_interrupt_save() handles its argument and due > to the need to def