aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorHugh Dickins <hugh@veritas.com>2005-09-03 15:54:37 -0700
committerLinus Torvalds <torvalds@evo.osdl.org>2005-09-05 00:05:41 -0700
commitfb4f88dcabdc716c7c350e09cf4a38a419b007e1 (patch)
tree1a7806e3ac8bd45eded544763324c13c9f95c0e6 /lib
parent89d09a2c80ea6baafb559b86d545fada05e14ab5 (diff)
[PATCH] swap: get_swap_page drop swap_list_lock
Rewrite get_swap_page to allocate in just the same sequence as before, but without holding swap_list_lock across its scan_swap_map. Decrement nr_swap_pages and update swap_list.next in advance, while still holding swap_list_lock. Skip full devices by testing highest_bit. Swapoff hold swap_device_lock as well as swap_list_lock to clear SWP_WRITEOK. Reduces lock contention when there are parallel swap devices of the same priority. Signed-off-by: Hugh Dickins <hugh@veritas.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'lib')
0 files changed, 0 insertions, 0 deletions