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

From: Jason Gunthorpe
Date: Fri Jul 19 2019 - 07:48:56 EST


On Fri, Jul 19, 2019 at 12:52:39PM +0200, Pavel Machek wrote:
> On Thu 2019-07-18 22:57:48, Christoph Hellwig wrote:
> > On Thu, Jul 18, 2019 at 06:32:53PM -0700, john.hubbard@xxxxxxxxx wrote:
> > > + HMM_MIRROR provides a way to mirror ranges of the CPU page tables
> > > + of a process into a device page table. Here, mirror means "keep
> > > + synchronized". Prerequisites: the device must provide the ability
> > > + to write-protect its page tables (at PAGE_SIZE granularity), and
> > > + must be able to recover from the resulting potential page faults.
> > > +
> > > + Select HMM_MIRROR if you have hardware that meets the above
> > > + description. An early, partial list of such hardware is:
> > > + an NVIDIA GPU >= Pascal, Mellanox IB >= mlx5, or an AMD GPU.
> >
> > Nevermind that the Nvidia support is stagaging and looks rather broken,
> > there is no Mellanox user of this either at this point.
> >
> > But either way this has no business in a common kconfig help. Just
> > drop the fine grained details and leave it to the overview.
>
> I disagree here. This explains what kind of hardware this is for (very
> new). Partial list does not hurt, and I know that I probably don't
> need to enable this.
>
> How else am I supposed to know if my computer needs page tables
> synchronized?

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.

Jason