summaryrefslogtreecommitdiffstats
path: root/mm/z3fold.c
diff options
context:
space:
mode:
authorHuang Ying2017-09-07 01:24:43 +0200
committerLinus Torvalds2017-09-07 02:27:30 +0200
commit81a0298bdfab0203d360df7c9bf690d1d457f999 (patch)
treeb235dc190ff9239e11aec51f1b206a21b7c80a2e /mm/z3fold.c
parentmm, swap: add sysfs interface for VMA based swap readahead (diff)
downloadkernel-qcow2-linux-81a0298bdfab0203d360df7c9bf690d1d457f999.tar.gz
kernel-qcow2-linux-81a0298bdfab0203d360df7c9bf690d1d457f999.tar.xz
kernel-qcow2-linux-81a0298bdfab0203d360df7c9bf690d1d457f999.zip
mm, swap: don't use VMA based swap readahead if HDD is used as swap
VMA based swap readahead will readahead the virtual pages that is continuous in the virtual address space. While the original swap readahead will readahead the swap slots that is continuous in the swap device. Although VMA based swap readahead is more correct for the swap slots to be readahead, it will trigger more small random readings, which may cause the performance of HDD (hard disk) to degrade heavily, and may finally exceed the benefit. To avoid the issue, in this patch, if the HDD is used as swap, the VMA based swap readahead will be disabled, and the original swap readahead will be used instead. Link: http://lkml.kernel.org/r/20170807054038.1843-6-ying.huang@intel.com Signed-off-by: "Huang, Ying" <ying.huang@intel.com> Cc: Johannes Weiner <hannes@cmpxchg.org> Cc: Minchan Kim <minchan@kernel.org> Cc: Rik van Riel <riel@redhat.com> Cc: Shaohua Li <shli@kernel.org> Cc: Hugh Dickins <hughd@google.com> Cc: Fengguang Wu <fengguang.wu@intel.com> Cc: Tim Chen <tim.c.chen@intel.com> Cc: Dave Hansen <dave.hansen@intel.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'mm/z3fold.c')
0 files changed, 0 insertions, 0 deletions