diff options
author | Michel Lespinasse <walken@google.com> | 2013-05-07 15:45:50 +0200 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2013-05-07 16:20:16 +0200 |
commit | f7dd1cee9a4e2b1450e4a3732636dfbf28562ee4 (patch) | |
tree | 4dc69d1b121d07d25d6dac56fd33eaffd6dac91f /lib/locking-selftest-wsem.h | |
parent | rwsem: make the waiter type an enumeration rather than a bitmask (diff) | |
download | linux-f7dd1cee9a4e2b1450e4a3732636dfbf28562ee4.tar.xz linux-f7dd1cee9a4e2b1450e4a3732636dfbf28562ee4.zip |
rwsem: shorter spinlocked section in rwsem_down_failed_common()
This change reduces the size of the spinlocked and TASK_UNINTERRUPTIBLE
sections in rwsem_down_failed_common():
- We only need the sem->wait_lock to insert ourselves on the wait_list;
the waiter node can be prepared outside of the wait_lock.
- The task state only needs to be set to TASK_UNINTERRUPTIBLE immediately
before checking if we actually need to sleep; it doesn't need to protect
the entire function.
Signed-off-by: Michel Lespinasse <walken@google.com>
Reviewed-by: Rik van Riel <riel@redhat.com>
Reviewed-by: Peter Hurley <peter@hurleysoftware.com>
Acked-by: Davidlohr Bueso <davidlohr.bueso@hp.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'lib/locking-selftest-wsem.h')
0 files changed, 0 insertions, 0 deletions