]> git.baikalelectronics.ru Git - kernel.git/commit
swap: make each swap partition have one address_space
authorShaohua Li <shli@kernel.org>
Sat, 23 Feb 2013 00:34:37 +0000 (16:34 -0800)
committerLinus Torvalds <torvalds@linux-foundation.org>
Sun, 24 Feb 2013 01:50:17 +0000 (17:50 -0800)
commit354fda0c58163ac440f2a1ef11891896426333a0
tree7f7da99d94481a1d4c78ebf05b410fc8ba654a39
parent8246e4113a181b95b56137168071612e620fe883
swap: make each swap partition have one address_space

When I use several fast SSD to do swap, swapper_space.tree_lock is
heavily contended.  This makes each swap partition have one
address_space to reduce the lock contention.  There is an array of
address_space for swap.  The swap entry type is the index to the array.

In my test with 3 SSD, this increases the swapout throughput 20%.

[akpm@linux-foundation.org: revert unneeded change to  __add_to_swap_cache]
Signed-off-by: Shaohua Li <shli@fusionio.com>
Cc: Hugh Dickins <hughd@google.com>
Acked-by: Rik van Riel <riel@redhat.com>
Acked-by: Minchan Kim <minchan@kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
fs/proc/meminfo.c
include/linux/swap.h
mm/memcontrol.c
mm/mincore.c
mm/swap.c
mm/swap_state.c
mm/swapfile.c
mm/util.c