Re: [PATCH] mm/Kconfig: additional help text for HMM_MIRROR option
From: Ira Weiny
Date: Fri Jul 19 2019 - 00:34:46 EST
On Thu, Jul 18, 2019 at 06:32:53PM -0700, john.hubbard@xxxxxxxxx wrote:
> From: John Hubbard <jhubbard@xxxxxxxxxx>
> The HMM_MIRROR option in Kconfig is a little underdocumented and
> mysterious, and leaves people wondering whether to enable it.
> Add text explaining just a little bit more about HMM, and also
> mention which hardware would benefit from having HMM_MIRROR
> Suggested-by: Pavel Machek <pavel@xxxxxx>
> Cc: Balbir Singh <bsingharora@xxxxxxxxx>
> Cc: Dan Williams <dan.j.williams@xxxxxxxxx>
> Cc: Jason Gunthorpe <jgg@xxxxxxxx>
> Cc: Jerome Glisse <jglisse@xxxxxxxxxx>
> Cc: Christoph Hellwig <hch@xxxxxxxxxxxxx>
> Signed-off-by: John Hubbard <jhubbard@xxxxxxxxxx>
> Hi Pavel and all, does this help? I've tried to capture the key missing bits
> of documentation, but still keep it small, for Kconfig.
> John Hubbard
> mm/Kconfig | 17 ++++++++++++-----
> 1 file changed, 12 insertions(+), 5 deletions(-)
> diff --git a/mm/Kconfig b/mm/Kconfig
> index 56cec636a1fc..2fcb92e7f696 100644
> --- a/mm/Kconfig
> +++ b/mm/Kconfig
> @@ -681,11 +681,18 @@ config HMM_MIRROR
> depends on MMU && 64BIT
> select MMU_NOTIFIER
> - Select HMM_MIRROR if you want to mirror range of the CPU page table 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.
> + This is Heterogeneous Memory Management (HMM) process address space
> + mirroring.
> + 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.
I don't think we want to put device information here. If we want that
information in Kconfig best to put it in the devices themselves. Otherwise
this list will get stale.
Other than that, looks good.
Reviewed-by: Ira Weiny <ira.weiny@xxxxxxxxx>
> config DEVICE_PRIVATE
> bool "Unaddressable device memory (GPU memory, ...)"