diff mbox series

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

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

Commit Message

SeongJae Park June 8, 2020, 11:40 a.m. UTC
From: SeongJae Park <sjpark@amazon.de>

This commit exports 'lookup_page_ext()' to GPL modules.  This will be
used by DAMON.

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

Comments

David Hildenbrand June 8, 2020, 11:53 a.m. UTC | #1
On 08.06.20 13:40, SeongJae Park wrote:
> From: SeongJae Park <sjpark@amazon.de>
> 
> This commit exports 'lookup_page_ext()' to GPL modules.  This will be
> used by DAMON.
> 
> Signed-off-by: SeongJae Park <sjpark@amazon.de>
> Reviewed-by: Leonard Foerster <foersleo@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)
>  {
> 

I've been told to always smuggle new EXPORTs into the patch that
actually needs it (and cc relevant people on that patch instead).
Christoph Hellwig June 8, 2020, 3:49 p.m. UTC | #2
On Mon, Jun 08, 2020 at 01:53:23PM +0200, David Hildenbrand wrote:
> > @@ -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)
> >  {
> > 
> 
> I've been told to always smuggle new EXPORTs into the patch that
> actually needs it (and cc relevant people on that patch instead).

A separate patch for anything remotely controversial really helps it
to stick out, so I think keeping it separate is a very good practice.
David Hildenbrand June 8, 2020, 6:15 p.m. UTC | #3
> Am 08.06.2020 um 18:11 schrieb Christoph Hellwig <hch@infradead.org>:
> 
> On Mon, Jun 08, 2020 at 01:53:23PM +0200, David Hildenbrand wrote:
>>> @@ -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)
>>> {
>>> 
>> 
>> I've been told to always smuggle new EXPORTs into the patch that
>> actually needs it (and cc relevant people on that patch instead).
> 
> A separate patch for anything remotely controversial really helps it
> to stick out, so I think keeping it separate is a very good practice.
> 

That used to be my approach until Michal told me to do it differently. And there is a good point for it: Reviewers actually understand in which context it is used and if it is really required.

Having that said, I don‘t have a strong opinion on this.
vrd@amazon.com June 10, 2020, 8:13 p.m. UTC | #4
On 6/8/20 1:40 PM, SeongJae Park wrote:
> From: SeongJae Park <sjpark@amazon.de>
> 
> This commit exports 'lookup_page_ext()' to GPL modules.  This will be
> used by DAMON.
> 
> 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)
>  {
> 




Amazon Development Center Germany GmbH
Krausenstr. 38
10117 Berlin
Geschaeftsfuehrung: Christian Schlaeger, Jonathan Weiss
Eingetragen am Amtsgericht Charlottenburg unter HRB 149173 B
Sitz: Berlin
Ust-ID: DE 289 237 879
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)
 {