Re: [PATCH RFC 0/4] mm: Remember young bit for migration entries

From: Peter Xu
Date: Fri Jul 29 2022 - 18:43:16 EST


On Fri, Jul 29, 2022 at 10:07:02AM -0700, Nadav Amit wrote:
> On Jul 28, 2022, at 6:40 PM, Peter Xu <peterx@xxxxxxxxxx> wrote:
>
> > [Marking as RFC; only x86 is supported for now, plan to add a few more
> > archs when there's a formal version]
> >
> > Problem
> > =======
> >
> > When migrate a page, right now we always mark the migrated page as old.
> > The reason could be that we don't really know whether the page is hot or
> > cold, so we could have taken it a default negative assuming that's safer.
>
> Looks good to me.

Thanks for the quick review comment, Nadav.

>
> I just wonder whether the order of the patches should be different. I always
> understood that separating the “enabling” patch from the others is not a
> good practice, since it complicates bisection. I guess it is more of a minor
> issue for such a small patch-set…

Yeah I'd guess you mean when there are a bunch of patches to form one
feature, then we may want to be able to know which part of the feature
break something. But as you mentioned this feature is mostly implemented
in patch 2 only.

I can squash the enablement patch into the same patch, but when comes to
more archs it also means I'll squash all the archs into the same patch.
I'm just afraid it'll complicate that patch too much - I'd expect each
calculation of swp offset for any arch may not be that straightforward
enough, so it'll be good if they can be reviewed separately and carefully.

--
Peter Xu