mm/hmm: add ARCH_HAS_HMM_MIRROR ARCH_HAS_HMM_DEVICE Kconfig
Subsystems (2)
PATCH 1/1 mm/hmm: add ARCH_HAS_HMM_MIRROR ARCH_HAS_HMM_DEVICE Kconfig
From: Jérôme Glisse <[email protected]>
This patch just add 2 new Kconfig that are _not use_ by anyone. I check that various make ARCH=somearch allmodconfig do work and do not complain. This new Kconfig need to be added first so that device driver that do depend on HMM can be updated.
Once drivers are updated then i can update the HMM Kconfig to depends on this new Kconfig in a followup patch.
--- mm/Kconfig | 16 ++++++++++++++++ 1 file changed, 16 insertions(+)
mm/Kconfig +16 -0
@@ -676,6 +676,22 @@ config ZONE_DEVICE If FS_DAX is enabled, then say Y. +config ARCH_HAS_HMM_MIRROR + bool + default y + depends on (X86_64 || PPC64) + depends on MMU && 64BIT + +config ARCH_HAS_HMM_DEVICE + bool + default y + depends on (X86_64 || PPC64) + depends on MEMORY_HOTPLUG + depends on MEMORY_HOTREMOVE + depends on SPARSEMEM_VMEMMAP + depends on ARCH_HAS_ZONE_DEVICE + select XARRAY_MULTI + config ARCH_HAS_HMM bool default y
Signature · 1 line
2.20.1
Andrew just the patch that would be nice to get in 5.2 so i can fix device driver Kconfig before doing the real update to mm HMM Kconfig
Quoted 51 lines · On Wed, Apr 17, 2019 at 05:11:41PM -0400, [email protected] wrote:
From: Jérôme Glisse <[email protected]>
This patch just add 2 new
Kconfigthat are_notuse_by anyone. I check that various make ARCH=somearch allmodconfig do work and do not complain. This newKconfigneed to be added first so that device driver that do depend on HMM can be updated.Once drivers are updated then i can update the HMM
Kconfigto depends on this newKconfigin a followup patch.Signed-off-by Jérôme Glisse <[email protected]>Cc Guenter Roeck <[email protected]>Cc Leon Romanovsky <[email protected]>Cc Jason Gunthorpe <[email protected]>Cc Andrew Morton <[email protected]>Cc Ralph Campbell <[email protected]>Cc John Hubbard <[email protected]>--- mm/Kconfig | 16 ++++++++++++++++ 1 file changed, 16 insertions(+)mm/Kconfig +16
-0@@ -676,6 +676,22 @@ config ZONE_DEVICE If FS_DAX is enabled, then say Y. +config ARCH_HAS_HMM_MIRROR + bool + default y + depends on (X86_64 || PPC64) + depends on MMU && 64BIT + +config ARCH_HAS_HMM_DEVICE + bool + default y + depends on (X86_64 || PPC64) + depends on MEMORY_HOTPLUG + depends on MEMORY_HOTREMOVE + depends on SPARSEMEM_VMEMMAP + depends on ARCH_HAS_ZONE_DEVICE + select XARRAY_MULTI + config ARCH_HAS_HMM bool default ySignature · 1 line
2.20.1
Quoted 14 lines · Jerome Glisse
Andrew just the patch that would be nice to get in 5.2 so i can fix device driver
Kconfigbefore doing the real update to mm HMMKconfigQuoted 10 lines · On Wed, Apr 17, 2019 at 05:11:41PM -0400, [email protected] wrote:
From: Jérôme Glisse <[email protected]>
This patch just add 2 new
Kconfigthat are_notuse_by anyone. I check that various make ARCH=somearch allmodconfig do work and do not complain. This newKconfigneed to be added first so that device driver that do depend on HMM can be updated.Once drivers are updated then i can update the HMM
Kconfigto depends on this newKconfigin a followup patch.
I am probably missing something, but why not submit the entire series together ? That might explain why XARRAY_MULTI is enabled below, and what the series is about. Additional comments below.
Quoted 19 lines
Quoted 19 lines
Signed-off-by Jérôme Glisse <[email protected]>Cc Guenter Roeck <[email protected]>Cc Leon Romanovsky <[email protected]>Cc Jason Gunthorpe <[email protected]>Cc Andrew Morton <[email protected]>Cc Ralph Campbell <[email protected]>Cc John Hubbard <[email protected]>--- mm/Kconfig | 16 ++++++++++++++++ 1 file changed, 16 insertions(+)mm/Kconfig +0
-0@@ -676,6 +676,22 @@ config ZONE_DEVICE If FS_DAX is enabled, then say Y.
Quoted 14 lines
Quoted 4 lines
mm/Kconfig +4
-0+config ARCH_HAS_HMM_MIRROR + bool + default y + depends on (X86_64 || PPC64)mm/Kconfig config ZONE_DEVICE · line 692
Quoted 10 lines
mm/Kconfig +10
-0+ depends on MMU && 64BIT + +config ARCH_HAS_HMM_DEVICE + bool + default y + depends on (X86_64 || PPC64) + depends on MEMORY_HOTPLUG + depends on MEMORY_HOTREMOVE + depends on SPARSEMEM_VMEMMAP + depends on ARCH_HAS_ZONE_DEVICE
This is almost identical to ARCH_HAS_HMM except ARCH_HAS_HMM depends on ZONE_DEVICE and MMU && 64BIT. ARCH_HAS_HMM_MIRROR and ARCH_HAS_HMM_DEVICE together almost match ARCH_HAS_HMM, except for the ARCH_HAS_ZONE_DEVICE vs. ZONE_DEVICE dependency. And ZONE_DEVICE selects XARRAY_MULTI, meaning there is really substantial overlap.
Not really my concern, but personally I'd like to see some reasoning why the additional options are needed .. thus the question above, why not submit the series together ?
Thanks,
Guenter
Quoted 8 lines
Quoted 8 lines
mm/Kconfig +2
-0+ select XARRAY_MULTI + config ARCH_HAS_HMM bool default ySignature · 1 line
2.20.1
Quoted 61 lines · Guenter Roeck
Quoted 14 lines · Jerome Glisse
Andrew just the patch that would be nice to get in 5.2 so i can fix device driver
Kconfigbefore doing the real update to mm HMMKconfigQuoted 10 lines · On Wed, Apr 17, 2019 at 05:11:41PM -0400, [email protected] wrote:
From: Jérôme Glisse <[email protected]>
This patch just add 2 new
Kconfigthat are_notuse_by anyone. I check that various make ARCH=somearch allmodconfig do work and do not complain. This newKconfigneed to be added first so that device driver that do depend on HMM can be updated.Once drivers are updated then i can update the HMM
Kconfigto depends on this newKconfigin a followup patch.I am probably missing something, but why not submit the entire series together ? That might explain why
XARRAY_MULTIis enabled below, and what the series is about. Additional comments below.Quoted 19 lines
Quoted 19 lines
Signed-off-by Jérôme Glisse <[email protected]>Cc Guenter Roeck <[email protected]>Cc Leon Romanovsky <[email protected]>Cc Jason Gunthorpe <[email protected]>Cc Andrew Morton <[email protected]>Cc Ralph Campbell <[email protected]>Cc John Hubbard <[email protected]>--- mm/Kconfig | 16 ++++++++++++++++ 1 file changed, 16 insertions(+)mm/Kconfig +0
-0@@ -676,6 +676,22 @@ config ZONE_DEVICE If FS_DAX is enabled, then say Y.Quoted 14 lines
Quoted 4 lines
mm/Kconfig +4
-0+config ARCH_HAS_HMM_MIRROR + bool + default y + depends on (X86_64 || PPC64)mm/Kconfig config ZONE_DEVICE · line 692
Quoted 10 lines
mm/Kconfig +10
-0+ depends on MMU && 64BIT + +config ARCH_HAS_HMM_DEVICE + bool + default y + depends on (X86_64 || PPC64) + depends on MEMORY_HOTPLUG + depends on MEMORY_HOTREMOVE + depends on SPARSEMEM_VMEMMAP + depends on ARCH_HAS_ZONE_DEVICEThis is almost identical to
ARCH_HAS_HMMexceptARCH_HAS_HMMdepends onZONE_DEVICEand MMU && 64BIT.ARCH_HAS_HMM_MIRRORandARCH_HAS_HMM_DEVICEtogether almost matchARCH_HAS_HMM, except for theARCH_HAS_ZONE_DEVICEvs.ZONE_DEVICEdependency. AndZONE_DEVICEselectsXARRAY_MULTI, meaning there is really substantial overlap.
Quoted 4 lines
Not really my concern, but personally I'd like to see some reasoning why the additional options are needed .. thus the question above, why not submit the series together ?
There is no serie here, this is about solving Kconfig for HMM given that device driver are going through their own tree we want to avoid changing them from the mm tree. So plan is:
1 - Kernel release N add the new Kconfig to mm/Kconfig (this patch) 2 - Kernel release N+1 update driver to depend on new Kconfig ie
stop using ARCH_HASH_HMM and start using ARCH_HAS_HMM_MIRROR and ARCH_HAS_HMM_DEVICE (one or the other or both depending on the driver)
3 - Kernel release N+2 remove ARCH_HASH_HMM and do final Kconfig
update in mm/Kconfig
This has been discuss in the past and while it is bit painfull it is the easiest solution (outside git topic branch but mm tree is not merge as git).
Cheers,
Jérôme