mm/damon/schemes: add 'LRU_PRIO' DAMOS action
This commit adds a new DAMOS action called 'LRU_PRIO' for the physical address space. The action prioritizes pages in the memory regions of the user-specified target access pattern on their LRU lists. This is hence supposed to be used for frequently accessed (hot) memory regions so that hot pages could be more likely protected under memory pressure. Internally, it simply calls 'mark_page_accessed()'. Link: https://lkml.kernel.org/r/20220613192301.8817-5-sj@kernel.org Signed-off-by: SeongJae Park <sj@kernel.org> Cc: Jonathan Corbet <corbet@lwn.net> Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
This commit is contained in:
@@ -86,6 +86,7 @@ struct damon_target {
|
||||
* @DAMOS_PAGEOUT: Call ``madvise()`` for the region with MADV_PAGEOUT.
|
||||
* @DAMOS_HUGEPAGE: Call ``madvise()`` for the region with MADV_HUGEPAGE.
|
||||
* @DAMOS_NOHUGEPAGE: Call ``madvise()`` for the region with MADV_NOHUGEPAGE.
|
||||
* @DAMOS_LRU_PRIO: Prioritize the region on its LRU lists.
|
||||
* @DAMOS_STAT: Do nothing but count the stat.
|
||||
* @NR_DAMOS_ACTIONS: Total number of DAMOS actions
|
||||
*/
|
||||
@@ -95,6 +96,7 @@ enum damos_action {
|
||||
DAMOS_PAGEOUT,
|
||||
DAMOS_HUGEPAGE,
|
||||
DAMOS_NOHUGEPAGE,
|
||||
DAMOS_LRU_PRIO,
|
||||
DAMOS_STAT, /* Do nothing but only record the stat */
|
||||
NR_DAMOS_ACTIONS,
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user