d637413f3f
On our raw spinlocks, we currently have an attempt at the lock, and if we do not get it we enter a spin loop. This spinloop will likely continue for awhile, and we pridict likely. Shouldn't we predict that we will get out of the loop so our next instructions are already prefetched. Even when we miss because the lock is still held, it won't matter since we are waiting anyways. I did a couple quick benchmarks, but the results are inconclusive. 16-way 690 running specjbb with original code # ./specjbb 3000 16 1 1 19 30 120 ... Valid run, Score is 59282 16-way 690 running specjbb with unlikely code # ./specjbb 3000 16 1 1 19 30 120 ... Valid run, Score is 59541 I saw a smaller increase on a JS20 (~1.6%) JS20 specjbb w/ original code # ./specjbb 400 2 1 1 19 30 120 ... Valid run, Score is 20460 JS20 specjbb w/ unlikely code # ./specjbb 400 2 1 1 19 30 120 ... Valid run, Score is 20803 Anton said: Mispredicting the spinlock busy loop also means we slow down the rate at which we do the loads which can be good for heavily contended locks. Note: There are some gcc issues with our default build and branch prediction, but a CONFIG_POWER4_ONLY build should emit them correctly. I'm working with Alan Modra on it now. Signed-off-by: Jake Moilanen <moilanen@austin.ibm.com> Signed-off-by: Anton Blanchard <anton@samba.org> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org> |
||
---|---|---|
.. | ||
iSeries | ||
8253pit.h | ||
a.out.h | ||
abs_addr.h | ||
agp.h | ||
atomic.h | ||
bitops.h | ||
bootinfo.h | ||
btext.h | ||
bug.h | ||
bugs.h | ||
byteorder.h | ||
cache.h | ||
cacheflush.h | ||
checksum.h | ||
compat.h | ||
cputable.h | ||
cputime.h | ||
current.h | ||
dbdma.h | ||
delay.h | ||
div64.h | ||
dma-mapping.h | ||
dma.h | ||
eeh.h | ||
elf.h | ||
errno.h | ||
fcntl.h | ||
floppy.h | ||
hardirq.h | ||
hdreg.h | ||
hvcall.h | ||
hvconsole.h | ||
hvcserver.h | ||
hw_irq.h | ||
ide.h | ||
io.h | ||
ioctl.h | ||
ioctls.h | ||
iommu.h | ||
ipc.h | ||
ipcbuf.h | ||
irq.h | ||
kdebug.h | ||
keylargo.h | ||
kmap_types.h | ||
kprobes.h | ||
linkage.h | ||
lmb.h | ||
local.h | ||
lppaca.h | ||
machdep.h | ||
macio.h | ||
mc146818rtc.h | ||
memory.h | ||
mman.h | ||
mmu.h | ||
mmu_context.h | ||
mmzone.h | ||
module.h | ||
msgbuf.h | ||
naca.h | ||
namei.h | ||
numnodes.h | ||
nvram.h | ||
of_device.h | ||
paca.h | ||
page.h | ||
param.h | ||
parport.h | ||
pci-bridge.h | ||
pci.h | ||
percpu.h | ||
pgalloc.h | ||
pgtable.h | ||
plpar_wrappers.h | ||
pmac_feature.h | ||
pmac_low_i2c.h | ||
pmc.h | ||
poll.h | ||
posix_types.h | ||
ppc32.h | ||
ppc_asm.h | ||
ppcdebug.h | ||
processor.h | ||
prom.h | ||
pSeries_reconfig.h | ||
ptrace-common.h | ||
ptrace.h | ||
resource.h | ||
rtas.h | ||
rwsem.h | ||
scatterlist.h | ||
seccomp.h | ||
sections.h | ||
segment.h | ||
semaphore.h | ||
sembuf.h | ||
serial.h | ||
setup.h | ||
shmbuf.h | ||
shmparam.h | ||
sigcontext.h | ||
siginfo.h | ||
signal.h | ||
smp.h | ||
smu.h | ||
socket.h | ||
sockios.h | ||
spinlock.h | ||
sstep.h | ||
stat.h | ||
statfs.h | ||
string.h | ||
system.h | ||
systemcfg.h | ||
termbits.h | ||
termios.h | ||
thread_info.h | ||
time.h | ||
timex.h | ||
tlb.h | ||
tlbflush.h | ||
topology.h | ||
types.h | ||
uaccess.h | ||
ucontext.h | ||
udbg.h | ||
unaligned.h | ||
uninorth.h | ||
unistd.h | ||
user.h | ||
vdso.h | ||
vga.h | ||
vio.h | ||
xics.h | ||
xor.h |