diff options
author | Michel Lespinasse <walken@google.com> | 2010-08-09 17:21:18 -0700 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2010-08-09 20:45:11 -0700 |
commit | fd41b33435ada87323cc86b50959fbffe35192c8 (patch) | |
tree | 6d2a7e79557e5de21bc91fce5b939c1f7dc1355c /mm/percpu-km.c | |
parent | 70bdc6e0644f3535e93bac5c364ca199397e507e (diff) | |
download | linux-stable-fd41b33435ada87323cc86b50959fbffe35192c8.tar.gz linux-stable-fd41b33435ada87323cc86b50959fbffe35192c8.tar.bz2 linux-stable-fd41b33435ada87323cc86b50959fbffe35192c8.zip |
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 'mm/percpu-km.c')
0 files changed, 0 insertions, 0 deletions