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>
Showing
- fs/proc/meminfo.c 2 additions, 2 deletionsfs/proc/meminfo.c
- include/linux/swap.h 5 additions, 4 deletionsinclude/linux/swap.h
- mm/memcontrol.c 2 additions, 2 deletionsmm/memcontrol.c
- mm/mincore.c 3 additions, 2 deletionsmm/mincore.c
- mm/swap.c 7 additions, 2 deletionsmm/swap.c
- mm/swap_state.c 38 additions, 17 deletionsmm/swap_state.c
- mm/swapfile.c 3 additions, 2 deletionsmm/swapfile.c
- mm/util.c 7 additions, 3 deletionsmm/util.c
Loading
Please register or sign in to comment