linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Baolin Wang <baolin.wang@linux.alibaba.com>
To: sj@kernel.org, akpm@linux-foundation.org
Cc: ying.huang@intel.com, dave.hansen@linux.intel.com,
	ziy@nvidia.com, shy828301@gmail.com,
	zhongjiang-ali@linux.alibaba.com, xlpang@linux.alibaba.com,
	baolin.wang@linux.alibaba.com, linux-mm@kvack.org,
	linux-kernel@vger.kernel.org
Subject: [PATCH v2 1/2] mm: Export the demote_page_list() function
Date: Wed, 22 Dec 2021 19:14:40 +0800	[thread overview]
Message-ID: <abebba759c00afc910650f3867fa40aa16ba10a0.1640171137.git.baolin.wang@linux.alibaba.com> (raw)
In-Reply-To: <cover.1640171137.git.baolin.wang@linux.alibaba.com>
In-Reply-To: <cover.1640171137.git.baolin.wang@linux.alibaba.com>

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



  reply	other threads:[~2021-12-22 11:14 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-12-22 11:14 [PATCH v2 0/2] Add a new scheme to support demotion on tiered memory system Baolin Wang
2021-12-22 11:14 ` Baolin Wang [this message]
2021-12-22 11:14 ` [PATCH v2 2/2] mm/damon: " Baolin Wang
2021-12-23  0:01 ` [PATCH v2 0/2] " Andrew Morton
2021-12-23  1:01   ` Baolin Wang
2021-12-23  1:07 ` Huang, Ying
2021-12-23  1:21   ` Baolin Wang
2021-12-23  3:22     ` Huang, Ying
2021-12-23  6:35       ` Baolin Wang
2021-12-23  7:51         ` Huang, Ying
2021-12-23 11:31           ` SeongJae Park
2021-12-27  3:09             ` Huang, Ying
2021-12-28  8:44               ` SeongJae Park
2021-12-29  1:33                 ` Huang, Ying
2021-12-29 10:34                   ` SeongJae Park
2021-12-30  3:16                     ` Huang, Ying
2021-12-30  8:03                       ` SeongJae Park
2021-12-30  9:31                 ` Baolin Wang

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=abebba759c00afc910650f3867fa40aa16ba10a0.1640171137.git.baolin.wang@linux.alibaba.com \
    --to=baolin.wang@linux.alibaba.com \
    --cc=akpm@linux-foundation.org \
    --cc=dave.hansen@linux.intel.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=shy828301@gmail.com \
    --cc=sj@kernel.org \
    --cc=xlpang@linux.alibaba.com \
    --cc=ying.huang@intel.com \
    --cc=zhongjiang-ali@linux.alibaba.com \
    --cc=ziy@nvidia.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).