linux-stable/arch/ppc64/mm
Olof Johansson d03853d566 [PATCH] PPC64: Remove hot busy-wait loop in __hash_page
It turns out that our current __hash_page code will do a very hot busy-wait
loop waiting on _PAGE_BUSY to be cleared.  It even does ldarx/stdcx in the
loop, which will bounce reservations around like crazy if there's more than
one CPU spinning on the same PTE (or even another PTE in the same
reservation granule).  The end result is that each fault takes longer when
there's contention, which in turn increases the chance of another thread
hitting the same fault and also piling up.  Not pretty.

There's two options here:
1. Do an out-of-line busy loop a'la spinlocks with just loads (no
   reserves)
2. Just bail and refault if needed.

(2) makes sense here: If the PTE is busy, chances are it's in flux anyway
and the other code path making a change might just be ready to hash it.

This fixes a stampede seen on a large-ish system where a multithreaded
HPC app faults in the same text pages on several cpus at the same time.

Signed-off-by: Olof Johansson <olof@lixom.net>
Cc: Paul Mackerras <paulus@samba.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-05-01 08:58:45 -07:00
..
Makefile Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
fault.c Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
hash_low.S [PATCH] PPC64: Remove hot busy-wait loop in __hash_page 2005-05-01 08:58:45 -07:00
hash_native.c Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
hash_utils.c Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
hugetlbpage.c [PATCH] ppc64: update to use the new 4L headers 2005-05-01 08:58:44 -07:00
imalloc.c Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
init.c [PATCH] ppc64: update to use the new 4L headers 2005-05-01 08:58:44 -07:00
mmap.c Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
numa.c Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
slb.c [PATCH] ppc64: remove unused argument to create_slbe 2005-05-01 08:58:44 -07:00
slb_low.S Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
stab.c Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
tlb.c Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00