Re: [RFC v2] mm: introduce page pin owner
From: Minchan Kim
Date: Fri Jan 21 2022 - 16:59:38 EST
On Fri, Jan 14, 2022 at 10:57:04AM -0800, Minchan Kim wrote:
> On Fri, Jan 14, 2022 at 07:47:49PM +0100, David Hildenbrand wrote:
> >
> > >>>>>> Otherwise, I'd like to have feature naming more higher level>>>>>> to represent page migration failure and then tracking unref of
> > >>>>>> the page. In the sense, PagePinOwner John suggested was good
> > >>>>>> candidate(Even, my original naming PagePinner was worse) since
> > >>>>>
> > >>>>> Personally, I dislike both variants.
> > >>>>>
> > >>>>>> I was trouble to abstract the feature with short word.
> > >>>>>> If we approach "what feature is doing" rather than "what's
> > >>>>>> the feature's goal"(I feel the your suggestion would be close
> > >>>>>> to what feature is doing), I'd like to express "unreference on
> > >>>>>> migraiton failed page" so PAGE_EXT_UNMIGRATED_UNREF
> > >>>>>> (However, I prefer the feature naming more "what we want to achieve")
> > >>>>>>
> > >>>>> E.g., PAGE_EXT_TRACE_UNREF will trace unref to the page once the bit is
> > >>>>> set. The functionality itself is completely independent of migration
> > >>>>> failures. That's just the code that sets it to enable the underlying
> > >>>>> tracing for that specific page.
> > >>>>
> > >>>> I agree that make something general is great but I also want to avoid
> > >>>> create something too big from the beginning with just imagination.
> > >>>> So, I'd like to hear more concrete and appealing usecases and then
> > >>>> we could think over this trace approach is really the best one to
> > >>>> achieve the goal. Once it's agreed, the naming you suggested would
> > >>>> make sense.
> > >>>
> > >>> At least for me it's a lot cleaner if a feature clearly expresses what
> > >>> it actually does. Staring at PAGE_EXT_PIN_OWNER I initially had no clue.
> > >>> I was assuming we would actually track (not trace!) all active FOLL_PIN
> > >>> (not unref callers!). Maybe that makes it clearer why I'd prefer a
> > >>> clearer name.
> > >>
> > >> I totally agree PagePinOwner is not 100% straightforward. I'm open for
> > >> other better name. Currently we are discussing how we could generalize
> > >> and whether it's useful or not. Depending on the discussion, the design/
> > >> interface as well as naming could be changed. No problem.
> > >
> > > PagePinOwner is just highly misleading. Because that's not what the
> > > feature does. Having that said, i hope we'll get other opinions as well.
> >
> > FWIW, I think "page reference holder" would be clearer. PageRefHolder or
> > PageReferenceHolder
> >
> > "Trace page reference holders on unref after migration of a page failed."
>
> Ah, crossed email. PageRefHolder. Yeah, sounds like better!
David,
I will change the naming to PageRefHolder and update the other
code/comments to follow it.
Do you have any objection?
Otherwise, I'd like to post next version to make the work proceeding.
Thanks.