-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
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. 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>
- Loading branch information
Huang Ying
authored and
Linus Torvalds
committed
Sep 7, 2017
1 parent
ec56017
commit d9bfcfd
Showing
2 changed files
with
106 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
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. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters