From: Michel Lespinasse Date: Tue, 10 Aug 2010 00:21:18 +0000 (-0700) Subject: rwsem: let RWSEM_WAITING_BIAS represent any number of waiting threads X-Git-Tag: v2.6.36-rc1~316 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=fd41b33435ada87323cc86b50959fbffe35192c8;p=pandora-kernel.git 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 Acked-by: David Howells Cc: Mike Waychison Cc: Suleiman Souhlal Cc: Ying Han Cc: Ingo Molnar Cc: Thomas Gleixner Cc: "H. Peter Anvin" Cc: Peter Zijlstra Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- Reading git-diff-tree failed