@@ -181,6 +181,8 @@ static inline void set_page_refcounted(struct page *page)
extern int isolate_lru_page(struct page *page);
extern void putback_lru_page(struct page *page);
extern void reclaim_throttle(pg_data_t *pgdat, enum vmscan_throttle_state reason);
+extern unsigned int demote_page_list(struct list_head *demote_pages,
+ struct pglist_data *pgdat);
/*
* in mm/rmap.c:
@@ -1480,8 +1480,8 @@ static struct page *alloc_demote_page(struct page *page, unsigned long node)
* another node. Pages which are not demoted are left on
* @demote_pages.
*/
-static unsigned int demote_page_list(struct list_head *demote_pages,
- struct pglist_data *pgdat)
+unsigned int demote_page_list(struct list_head *demote_pages,
+ struct pglist_data *pgdat)
{
int target_nid = next_demotion_node(pgdat->node_id);
unsigned int nr_succeeded;
Export the demote_page_list() function to the head file as a preparation to support page demotion for DAMON monitor. Signed-off-by: Baolin Wang <baolin.wang@linux.alibaba.com> --- mm/internal.h | 2 ++ mm/vmscan.c | 4 ++-- 2 files changed, 4 insertions(+), 2 deletions(-)