Re: [PATCH] mm/Kconfig: additional help text for HMM_MIRROR option

From: Jason Gunthorpe
Date: Mon Jul 22 2019 - 07:58:08 EST


On Fri, Jul 19, 2019 at 01:38:28PM -0700, John Hubbard wrote:
> On 7/19/19 5:04 AM, Pavel Machek wrote:
> > On Fri 2019-07-19 05:00:43, Christoph Hellwig wrote:
> >> On Fri, Jul 19, 2019 at 08:48:53AM -0300, Jason Gunthorpe wrote:
> >>> It is like MMU_NOTIFIERS, if something needs it, then it will select
> >>> it.
> >>>
> >>> Maybe it should just be a hidden kconfig anyhow as there is no reason
> >>> to turn it on without also turning on a using driver.
> >>
> >> We can't just select it due to the odd X86_64 || PPC64 dependency.
> >>
> >> Which also answers Pavels question: you never really need it, as we
> >> can only use it for optional functionality due to that.
> >
> > Okay, just explain it in the help text :-)..
> >
> > Alternatively... you can have WANT_HMM_MIRROR option drivers select,
> > and option HMM_MIRROR which is yes if WANT_HMM_MIRROR && (X86_64 ||
> > PPC64), no?
> >
>
> Yes. This really should be a hidden option that just auto-enables. It's
> not ideal to require people to both *find* HMM_MIRROR, *and* figure out
> that they need it. (I think it's just this way due to the history of how
> HMM got merged--it started off as a kind of experimental sandbox, so
> it had it's own config options, to avoid bothering anything else.)
>
> I'll send out a new patch to just auto-select. The WANT_HMM_MIRROR
> approach seems accurate, given the (X86_64 || PPC64) complication, probably
> after -rc1 is ready (I don't see the ODP code using HMM yet, so that
> must not have been merged yet.)
>
> Longer term, I vaguely recall that there is no strong reason preventing
> HMM from being made to work on other arches, and am hoping that it was
> just done this way to save development time. I don't want to leave it
> this way unless there's a good reason to.

No one has given me a satisfactory answer about the restriction
either.

The only thing this kconfig controls that could possibly be arch
specific is the page walking code in hmm_range_snapshot and
related.

Maybe there is/was some arch entanglement there?

Jason