lkml.org 
[lkml]   [2021]   [Dec]   [22]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH v2 1/2] mm: Export the demote_page_list() function
Date
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(-)

diff --git a/mm/internal.h b/mm/internal.h
index deb9bda..f11e444 100644
--- a/mm/internal.h
+++ b/mm/internal.h
@@ -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:
diff --git a/mm/vmscan.c b/mm/vmscan.c
index f3162a5..849dffa 100644
--- a/mm/vmscan.c
+++ b/mm/vmscan.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;
--
1.8.3.1
\
 
 \ /
  Last update: 2021-12-22 12:15    [W:0.068 / U:0.048 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site