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

SeongJae Park
2020-07-13T17:39:09Z

On Mon, 13 Jul 2020 20:19:09 +0300 Mike Rapoport <rppt@kernel.org> wrote:

> 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.

Agreed. I will drop the module support from the next spin.

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

It's indirectly used. In the 6th patch, DAMON uses 'set_page_young()' to not
interfere with other PTE Accessed bit users. And, 'set_page_young()' uses
'lookup_page_ext()' if !CONFIG_64BIT. That's why I exported it.

Thanks,
SeongJae Park