linux-stable-rt/arch/x86
Christoph Lameter 1f84260c8c SLUB: Alternate fast paths using cmpxchg_local
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 the cmpxchg_local is faster than an
interrupt enable/disable sequence. This is known to be true for both
x86 platforms so set FAST_CMPXCHG_LOCAL for both arches.

Currently another requirement for the fastpath is that the kernel is
compiled without preemption. The restriction will go away with the
introduction of a new per cpu allocator and new per cpu operations.

The advantages of a cmpxchg_local based fast path are:

1. Potentially lower cycle count (30%-60% faster)

2. There is no need to disable and enable interrupts on the fast path.
   Currently interrupts have to be disabled and enabled on every
   slab operation. This is likely avoiding a significant percentage
   of interrupt off / on sequences in the kernel.

3. The disposal of freed slabs can occur with interrupts enabled.

The alternate path is realized using #ifdef's. Several attempts to do the
same with macros and inline 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 define macros/functions that sometimes disable interrupts
and sometimes do something else).

[clameter: Stripped preempt bits and disabled fastpath if preempt is enabled]
Signed-off-by: Christoph Lameter <clameter@sgi.com>
Reviewed-by: Pekka Enberg <penberg@cs.helsinki.fi>
Cc: <linux-arch@vger.kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
2008-02-07 17:47:41 -08:00
..
boot x86: rename LARGE_PAGE_SIZE to PMD_PAGE_SIZE 2008-02-04 16:48:08 +01:00
configs
crypto
ia32 Sanitize the type of struct user.u_ar0 2008-02-07 08:42:30 -08:00
kernel Merge branch 'release' of git://git.kernel.org/pub/scm/linux/kernel/git/lenb/linux-acpi-2.6 2008-02-07 09:45:58 -08:00
kvm kvm: i386 fix 2008-02-05 09:44:06 -08:00
lguest
lib read_current_timer() cleanups 2008-02-06 10:41:02 -08:00
mach-default
mach-es7000
mach-generic
mach-rdc321x
mach-visws
mach-voyager calibrate_delay() must be __cpuinit 2008-02-06 10:41:08 -08:00
math-emu
mm Introduce flags for reserve_bootmem() 2008-02-07 08:42:25 -08:00
oprofile
pci intel-agp: add chipset flushing support 2008-02-05 14:33:32 +10:00
power
vdso
video
xen
Kconfig SLUB: Alternate fast paths using cmpxchg_local 2008-02-07 17:47:41 -08:00
Kconfig.cpu
Kconfig.debug x86: delay CPA self-test and repeat it 2008-02-06 22:39:45 +01:00
Makefile
Makefile_32.cpu