mm/hmm: Kconfig improvements for device memory and HMM interaction
Subsystems (2)
cover mm/hmm: Kconfig improvements for device memory and HMM interaction
From: John Hubbard <[email protected]>
Hi Jerome,
This applies on top of your hmm-next branch atgit://people.freedesktop.org/~glisse/linux.
Related point: even after this patch is applied, I'm still a bit unhappy about another minor point, which is:
If you select CONFIG_ZONE_DEVICE and CONFIG_HMM_MIRROR, then CONFIG_DEVICE_PRIVATE is still not selected. As I mentioned earlier, this configures HMM in a way that is essentially useless. Therefore, I'm still tempted to have CONFIG_HMM_MIRROR do an auto-select of CONFIG_DEVICE_PRIVATE, or something like that.
Thoughts on that?
John Hubbard (1):
mm/hmm: Kconfig improvements for device memory and HMM interaction
mm/Kconfig | 52 ++++++++++++++++++++++++++-------------------------- 1 file changed, 26 insertions(+), 26 deletions(-)
Signature · 7 lines
2.13.3 -- To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to [email protected]. For more info on Linux MM, see: http://www.linux-mm.org/ . Don't email: <a href=mailto:"[email protected]"> [email protected] </a>
PATCH 1/1 mm/hmm: Kconfig improvements for device memory and HMM interaction
From: John Hubbard <[email protected]>
The kernel's configuration for HMM is not perfect. You have to select "device memory" in order to even see the HMM option, and then it appears much earlier in the "make menuconfig" settings, so it's easy to miss. Furthermore, the "device memory" option doesn't mention that HMM requires it. So basically, HMM is invisible unless You Know How To Reveal It.
Improve the kernel configuration experience for HMM, by:
1) Moving the HMM section of mm/Kconfig down to just below the ZONE_DEVICE option that is a prerequisite to HMM.
2) Adding "HMM" to the one-line Kconfig summary in ZONE_DEVICE
--- mm/Kconfig | 52 ++++++++++++++++++++++++++-------------------------- 1 file changed, 26 insertions(+), 26 deletions(-)
mm/Kconfig +26 -26
@@ -262,31 +262,6 @@ config MIGRATION config ARCH_ENABLE_HUGEPAGE_MIGRATION bool -config ARCH_HAS_HMM - bool - default y - depends on X86_64 - depends on ZONE_DEVICE - depends on MMU && 64BIT - depends on MEMORY_HOTPLUG - depends on MEMORY_HOTREMOVE - depends on SPARSEMEM_VMEMMAP - -config HMM - bool - -config HMM_MIRROR - bool "HMM mirror CPU page table into a device page table" - depends on ARCH_HAS_HMM - select MMU_NOTIFIER - select HMM - help - 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. - config PHYS_ADDR_T_64BIT def_bool 64BIT || ARCH_PHYS_ADDR_T_64BIT
@@ -698,7 +673,7 @@ config ARCH_HAS_ZONE_DEVICE bool config ZONE_DEVICE - bool "Device memory (pmem, etc...) hotplug support" + bool "Device memory (pmem, HMM, etc...) hotplug support" depends on MEMORY_HOTPLUG depends on MEMORY_HOTREMOVE depends on SPARSEMEM_VMEMMAP
@@ -733,6 +708,31 @@ config DEVICE_PUBLIC memory; i.e., memory that is accessible from both the device and the CPU +config ARCH_HAS_HMM + bool + default y + depends on X86_64 + depends on ZONE_DEVICE + depends on MMU && 64BIT + depends on MEMORY_HOTPLUG + depends on MEMORY_HOTREMOVE + depends on SPARSEMEM_VMEMMAP + +config HMM + bool + +config HMM_MIRROR + bool "HMM mirror CPU page table into a device page table" + depends on ARCH_HAS_HMM + select MMU_NOTIFIER + select HMM + help + 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. + config FRAME_VECTOR bool
Signature · 7 lines
2.13.3 -- To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to [email protected]. For more info on Linux MM, see: http://www.linux-mm.org/ . Don't email: <a href=mailto:"[email protected]"> [email protected] </a>