From: Hugh Dickins Date: Sat, 3 Sep 2005 22:54:37 +0000 (-0700) Subject: [PATCH] swap: get_swap_page drop swap_list_lock X-Git-Tag: v2.6.14-rc1~982 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=fb4f88dcabdc716c7c350e09cf4a38a419b007e1;p=pandora-kernel.git [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 Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- Reading git-diff-tree failed