diff mbox series

[v18,01/14] mm/page_ext: Export lookup_page_ext() to GPL modules

Message ID 20200713084144.4430-2-sjpark@amazon.com (mailing list archive)
State New, archived
Headers show
Series Introduce Data Access MONitor (DAMON) | expand

Commit Message

SeongJae Park July 13, 2020, 8:41 a.m. UTC
From: SeongJae Park <sjpark@amazon.de>

This commit exports 'lookup_page_ext()' to GPL modules.  It will be used
by DAMON in following commit for the implementation of the region based
sampling.

Signed-off-by: SeongJae Park <sjpark@amazon.de>
Reviewed-by: Leonard Foerster <foersleo@amazon.de>
Reviewed-by: Varad Gautam <vrd@amazon.de>
---
 mm/page_ext.c | 1 +
 1 file changed, 1 insertion(+)

Comments

Mike Rapoport July 13, 2020, 12:08 p.m. UTC | #1
Hi,

On Mon, Jul 13, 2020 at 10:41:31AM +0200, SeongJae Park wrote:
> From: SeongJae Park <sjpark@amazon.de>
> 
> This commit exports 'lookup_page_ext()' to GPL modules.  It will be used
> by DAMON in following commit for the implementation of the region based
> sampling.

Maybe I'm missing something, but why is DAMON a module?

> Signed-off-by: SeongJae Park <sjpark@amazon.de>
> Reviewed-by: Leonard Foerster <foersleo@amazon.de>
> Reviewed-by: Varad Gautam <vrd@amazon.de>
> ---
>  mm/page_ext.c | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/mm/page_ext.c b/mm/page_ext.c
> index a3616f7a0e9e..9d802d01fcb5 100644
> --- a/mm/page_ext.c
> +++ b/mm/page_ext.c
> @@ -131,6 +131,7 @@ struct page_ext *lookup_page_ext(const struct page *page)
>  					MAX_ORDER_NR_PAGES);
>  	return get_entry(base, index);
>  }
> +EXPORT_SYMBOL_GPL(lookup_page_ext);
>  
>  static int __init alloc_node_page_ext(int nid)
>  {
> -- 
> 2.17.1
>
Mike Rapoport July 13, 2020, 5:19 p.m. UTC | #2
On Mon, Jul 13, 2020 at 02:21:43PM +0200, SeongJae Park wrote:
> On Mon, 13 Jul 2020 15:08:42 +0300 Mike Rapoport <rppt@kernel.org> wrote:
> 
> > Hi,
> > 
> > On Mon, Jul 13, 2020 at 10:41:31AM +0200, SeongJae Park wrote:
> > > From: SeongJae Park <sjpark@amazon.de>
> > > 
> > > This commit exports 'lookup_page_ext()' to GPL modules.  It will be used
> > > by DAMON in following commit for the implementation of the region based
> > > sampling.
> > 
> > Maybe I'm missing something, but why is DAMON a module?
> 
> I made it loadable just for easier adoption from downstream kernels.  I could
> drop the module build support if asked.
 
Well, exporting core mm symbols to modules should be considred very
carefully. 

Why lookup_page_ext() is required for DAMON? It is not used anywhere in
this patchset.


> Thanks,
> SeongJae Park
> 
> > 
> > > Signed-off-by: SeongJae Park <sjpark@amazon.de>
> > > Reviewed-by: Leonard Foerster <foersleo@amazon.de>
> > > Reviewed-by: Varad Gautam <vrd@amazon.de>
> > > ---
> > >  mm/page_ext.c | 1 +
> > >  1 file changed, 1 insertion(+)
> > > 
> > > diff --git a/mm/page_ext.c b/mm/page_ext.c
> > > index a3616f7a0e9e..9d802d01fcb5 100644
> > > --- a/mm/page_ext.c
> > > +++ b/mm/page_ext.c
> > > @@ -131,6 +131,7 @@ struct page_ext *lookup_page_ext(const struct page *page)
> > >  					MAX_ORDER_NR_PAGES);
> > >  	return get_entry(base, index);
> > >  }
> > > +EXPORT_SYMBOL_GPL(lookup_page_ext);
> > >  
> > >  static int __init alloc_node_page_ext(int nid)
> > >  {
> > > -- 
> > > 2.17.1
> > > 
> > 
> > -- 
> > Sincerely yours,
> > Mike.
diff mbox series

Patch

diff --git a/mm/page_ext.c b/mm/page_ext.c
index a3616f7a0e9e..9d802d01fcb5 100644
--- a/mm/page_ext.c
+++ b/mm/page_ext.c
@@ -131,6 +131,7 @@  struct page_ext *lookup_page_ext(const struct page *page)
 					MAX_ORDER_NR_PAGES);
 	return get_entry(base, index);
 }
+EXPORT_SYMBOL_GPL(lookup_page_ext);
 
 static int __init alloc_node_page_ext(int nid)
 {