d9bfcfdc41
The sysfs interface to control the VMA based swap readahead is added as follow, /sys/kernel/mm/swap/vma_ra_enabled Enable the VMA based swap readahead algorithm, or use the original global swap readahead algorithm. /sys/kernel/mm/swap/vma_ra_max_order Set the max order of the readahead window size for the VMA based swap readahead algorithm. The corresponding ABI documentation is added too. Link: http://lkml.kernel.org/r/20170807054038.1843-5-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>
27 lines
1.0 KiB
Plaintext
27 lines
1.0 KiB
Plaintext
What: /sys/kernel/mm/swap/
|
|
Date: August 2017
|
|
Contact: Linux memory management mailing list <linux-mm@kvack.org>
|
|
Description: Interface for swapping
|
|
|
|
What: /sys/kernel/mm/swap/vma_ra_enabled
|
|
Date: August 2017
|
|
Contact: Linux memory management mailing list <linux-mm@kvack.org>
|
|
Description: Enable/disable VMA based swap readahead.
|
|
|
|
If set to true, the VMA based swap readahead algorithm
|
|
will be used for swappable anonymous pages mapped in a
|
|
VMA, and the global swap readahead algorithm will be
|
|
still used for tmpfs etc. other users. If set to
|
|
false, the global swap readahead algorithm will be
|
|
used for all swappable pages.
|
|
|
|
What: /sys/kernel/mm/swap/vma_ra_max_order
|
|
Date: August 2017
|
|
Contact: Linux memory management mailing list <linux-mm@kvack.org>
|
|
Description: The max readahead size in order for VMA based swap readahead
|
|
|
|
VMA based swap readahead algorithm will readahead at
|
|
most 1 << max_order pages for each readahead. The
|
|
real readahead size for each readahead will be scaled
|
|
according to the estimation algorithm.
|