mm, swap: add sysfs interface for VMA based swap readahead
Subsystems (3)
[email protected]
maintainerPATCH 109/119 mm, swap: add sysfs interface for VMA based swap readahead
From: Huang Ying <[email protected]>
Subject: mm, swap: add sysfs interface for VMA based swap readahead
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.
Signed-off-by "Huang, Ying" <[email protected]>
Cc Johannes Weiner <[email protected]>
Cc Minchan Kim <[email protected]>
Cc Rik van Riel <[email protected]>
Cc Shaohua Li <[email protected]>
Cc Hugh Dickins <[email protected]>
Cc Fengguang Wu <[email protected]>
Cc Tim Chen <[email protected]>
Cc Dave Hansen <[email protected]>
Signed-off-by Andrew Morton <[email protected]>
---
Documentation/ABI/testing/sysfs-kernel-mm-swap | 26 ++++ mm/swap_state.c | 80 +++++++++++++++ 2 files changed, 106 insertions(+)
Documentation/ABI/testing/sysfs-kernel-mm-swap new file +26 -0
@@ -0,0 +1,26 @@ +What: /sys/kernel/mm/swap/ +Date: August 2017 +Contact: Linux memory management mailing list <[email protected]> +Description: Interface for swapping + +What: /sys/kernel/mm/swap/vma_ra_enabled +Date: August 2017 +Contact: Linux memory management mailing list <[email protected]> +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 <[email protected]> +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.
mm/swap_state.c renamed from mm/swap_state.c~mm-swap-add-sysfs-interface-for-vma-based-swap-readahead +80 -0
83 lines not on this page · raw message
_