summaryrefslogtreecommitdiff
path: root/lib/lru_cache.c
diff options
context:
space:
mode:
authorMichel Lespinasse <walken@google.com>2010-08-10 04:21:18 +0400
committerLinus Torvalds <torvalds@linux-foundation.org>2010-08-10 07:45:11 +0400
commitfd41b33435ada87323cc86b50959fbffe35192c8 (patch)
tree6d2a7e79557e5de21bc91fce5b939c1f7dc1355c /lib/lru_cache.c
parent70bdc6e0644f3535e93bac5c364ca199397e507e (diff)
downloadlinux-fd41b33435ada87323cc86b50959fbffe35192c8.tar.xz
rwsem: let RWSEM_WAITING_BIAS represent any number of waiting threads
Previously each waiting thread added a bias of RWSEM_WAITING_BIAS. With this change, the bias is added only once to indicate that the wait list is non-empty. This has a few nice properties which will be used in following changes: - when the spinlock is held and the waiter list is known to be non-empty, count < RWSEM_WAITING_BIAS <=> there is an active writer on that sem - count == RWSEM_WAITING_BIAS <=> there are waiting threads and no active readers/writers on that sem Signed-off-by: Michel Lespinasse <walken@google.com> Acked-by: David Howells <dhowells@redhat.com> Cc: Mike Waychison <mikew@google.com> Cc: Suleiman Souhlal <suleiman@google.com> Cc: Ying Han <yinghan@google.com> Cc: Ingo Molnar <mingo@elte.hu> Cc: Thomas Gleixner <tglx@linutronix.de> Cc: "H. Peter Anvin" <hpa@zytor.com> Cc: Peter Zijlstra <a.p.zijlstra@chello.nl> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'lib/lru_cache.c')
0 files changed, 0 insertions, 0 deletions