mirror of
https://github.com/torvalds/linux.git
synced 2024-12-14 23:25:54 +00:00
8cdcc53226
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>
19 lines
545 B
C
19 lines
545 B
C
/* SPDX-License-Identifier: GPL-2.0 */
|
|
/*
|
|
* Common Primitives for Data Access Monitoring
|
|
*
|
|
* Author: SeongJae Park <sj@kernel.org>
|
|
*/
|
|
|
|
#include <linux/damon.h>
|
|
|
|
struct page *damon_get_page(unsigned long pfn);
|
|
|
|
void damon_ptep_mkold(pte_t *pte, struct mm_struct *mm, unsigned long addr);
|
|
void damon_pmdp_mkold(pmd_t *pmd, struct mm_struct *mm, unsigned long addr);
|
|
|
|
int damon_pageout_score(struct damon_ctx *c, struct damon_region *r,
|
|
struct damos *s);
|
|
int damon_hot_score(struct damon_ctx *c, struct damon_region *r,
|
|
struct damos *s);
|