[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20200616140813.17863-5-sjpark@amazon.com>
Date: Tue, 16 Jun 2020 16:08:09 +0200
From: SeongJae Park <sjpark@...zon.com>
To: <akpm@...ux-foundation.org>
CC: SeongJae Park <sjpark@...zon.de>, <Jonathan.Cameron@...wei.com>,
<aarcange@...hat.com>, <acme@...nel.org>,
<alexander.shishkin@...ux.intel.com>, <amit@...nel.org>,
<benh@...nel.crashing.org>, <brendan.d.gregg@...il.com>,
<brendanhiggins@...gle.com>, <cai@....pw>,
<colin.king@...onical.com>, <corbet@....net>, <dwmw@...zon.com>,
<foersleo@...zon.de>, <irogers@...gle.com>, <jolsa@...hat.com>,
<kirill@...temov.name>, <mark.rutland@....com>, <mgorman@...e.de>,
<minchan@...nel.org>, <mingo@...hat.com>, <namhyung@...nel.org>,
<peterz@...radead.org>, <rdunlap@...radead.org>,
<riel@...riel.com>, <rientjes@...gle.com>, <rostedt@...dmis.org>,
<sblbir@...zon.com>, <shakeelb@...gle.com>, <shuah@...nel.org>,
<sj38.park@...il.com>, <snu@...zon.de>, <vbabka@...e.cz>,
<vdavydov.dev@...il.com>, <yang.shi@...ux.alibaba.com>,
<ying.huang@...el.com>, <david@...hat.com>,
<linux-damon@...zon.com>, <linux-mm@...ck.org>,
<linux-doc@...r.kernel.org>, <linux-kernel@...r.kernel.org>
Subject: [RFC v4 4/8] mm/rmap: Export essential functions for rmap_run
From: SeongJae Park <sjpark@...zon.de>
This commit exports the three essential functions for ramp walk,
'page_lock_anon_vma_read()', 'rmap_walk()', and 'page_rmapping()', to
GPL modules. Those will be used by DAMON for the physical memory
address based access monitoring in the following commit.
Signed-off-by: SeongJae Park <sjpark@...zon.de>
---
mm/rmap.c | 2 ++
mm/util.c | 1 +
2 files changed, 3 insertions(+)
diff --git a/mm/rmap.c b/mm/rmap.c
index f79a206b271a..20ac37b27a7d 100644
--- a/mm/rmap.c
+++ b/mm/rmap.c
@@ -579,6 +579,7 @@ struct anon_vma *page_lock_anon_vma_read(struct page *page)
rcu_read_unlock();
return anon_vma;
}
+EXPORT_SYMBOL_GPL(page_lock_anon_vma_read);
void page_unlock_anon_vma_read(struct anon_vma *anon_vma)
{
@@ -1934,6 +1935,7 @@ void rmap_walk(struct page *page, struct rmap_walk_control *rwc)
else
rmap_walk_file(page, rwc, false);
}
+EXPORT_SYMBOL_GPL(rmap_walk);
/* Like rmap_walk, but caller holds relevant rmap lock */
void rmap_walk_locked(struct page *page, struct rmap_walk_control *rwc)
diff --git a/mm/util.c b/mm/util.c
index 988d11e6c17c..1df32546fe28 100644
--- a/mm/util.c
+++ b/mm/util.c
@@ -620,6 +620,7 @@ void *page_rmapping(struct page *page)
page = compound_head(page);
return __page_rmapping(page);
}
+EXPORT_SYMBOL_GPL(page_rmapping);
/*
* Return true if this page is mapped into pagetables.
--
2.17.1
Powered by blists - more mailing lists