* [PATCH v2 1/3] nvme-multipath: change the NVME_MULTIPATH config option
2025-03-22 23:28 [PATCH v2 0/3] nvme: make core.nvme_multipath configurable John Meneghini
@ 2025-03-22 23:28 ` John Meneghini
2025-03-22 23:28 ` [PATCH v2 2/3] nvme-multipath: add the NVME_MULTIPATH_PARAM " John Meneghini
` (2 subsequent siblings)
3 siblings, 0 replies; 9+ messages in thread
From: John Meneghini @ 2025-03-22 23:28 UTC (permalink / raw)
To: kbusch, hch, sagi
Cc: loberman, linux-nvme, linux-kernel, emilne, jmeneghi, bgurney
Fix up the NVME_MULTIPATH config description so that
it accurately describes what it does.
Signed-off-by: John Meneghini <jmeneghi@redhat.com>
Tested-by: John Meneghini <jmeneghi@redhat.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
---
drivers/nvme/host/Kconfig | 13 +++++++++----
1 file changed, 9 insertions(+), 4 deletions(-)
diff --git a/drivers/nvme/host/Kconfig b/drivers/nvme/host/Kconfig
index 10e453b2436e..d47dfa80fb95 100644
--- a/drivers/nvme/host/Kconfig
+++ b/drivers/nvme/host/Kconfig
@@ -18,10 +18,15 @@ config NVME_MULTIPATH
bool "NVMe multipath support"
depends on NVME_CORE
help
- This option enables support for multipath access to NVMe
- subsystems. If this option is enabled only a single
- /dev/nvmeXnY device will show up for each NVMe namespace,
- even if it is accessible through multiple controllers.
+ This option controls support for multipath access to NVMe
+ subsystems. If this option is enabled support for NVMe multipath
+ access is included in the kernel. If this option is disabled support
+ for NVMe multipath access is excluded from the kernel. When this
+ option is disabled each controller/namespace receives its
+ own /dev/nvmeXnY device entry and NVMe multipath access is
+ not supported.
+
+ If unsure, say Y.
config NVME_VERBOSE_ERRORS
bool "NVMe verbose error reporting"
--
2.48.1
^ permalink raw reply related [flat|nested] 9+ messages in thread* [PATCH v2 2/3] nvme-multipath: add the NVME_MULTIPATH_PARAM config option
2025-03-22 23:28 [PATCH v2 0/3] nvme: make core.nvme_multipath configurable John Meneghini
2025-03-22 23:28 ` [PATCH v2 1/3] nvme-multipath: change the NVME_MULTIPATH config option John Meneghini
@ 2025-03-22 23:28 ` John Meneghini
2025-04-03 4:35 ` Christoph Hellwig
2025-04-14 20:19 ` Keith Busch
2025-03-22 23:28 ` [PATCH v2 3/3] nvme: update the multipath warning in nvme_init_ns_head John Meneghini
2025-03-28 17:29 ` [PATCH v2 0/3] nvme: make core.nvme_multipath configurable Keith Busch
3 siblings, 2 replies; 9+ messages in thread
From: John Meneghini @ 2025-03-22 23:28 UTC (permalink / raw)
To: kbusch, hch, sagi
Cc: loberman, linux-nvme, linux-kernel, emilne, jmeneghi, bgurney
The new CONFIG_NVME_MULTIPATH_PARAM option controls the core_nvme.multipath
parameter. When CONFIG_NVME_MULTIPATH_PARAM=n the multipath parameter is
removed from the kernel and nvme multipathing is permanently enabled.
When NVME_MULTIPATH_PARAM=y the nvme multipath parameter is added to the
kernel and nvme multipath support is controlled by the
core_nvme.multipath parameter.
By default CONFIG_NVME_MULTIPATH_PARAM=y
Signed-off-by: John Meneghini <jmeneghi@redhat.com>
Tested-by: John Meneghini <jmeneghi@redhat.com>
Reviewed-by: Bryan Gurney <bgurney@redhat.com>
---
drivers/nvme/host/Kconfig | 13 +++++++++++++
drivers/nvme/host/multipath.c | 3 ++-
2 files changed, 15 insertions(+), 1 deletion(-)
diff --git a/drivers/nvme/host/Kconfig b/drivers/nvme/host/Kconfig
index d47dfa80fb95..c8458b10c83f 100644
--- a/drivers/nvme/host/Kconfig
+++ b/drivers/nvme/host/Kconfig
@@ -28,6 +28,19 @@ config NVME_MULTIPATH
If unsure, say Y.
+config NVME_MULTIPATH_PARAM
+ bool "NVMe multipath param"
+ depends on NVME_CORE && NVME_MULTIPATH
+ default y
+ help
+ This option controls the inclusion of the NVMe core module
+ "multipath" parameter. If this option is disabled the
+ nvme_core.multipath parameter is excluded from the kernel.
+ If this option is enabled the nvme_core.multipath parameter
+ is included in the kernel.
+
+ If unsure, say Y.
+
config NVME_VERBOSE_ERRORS
bool "NVMe verbose error reporting"
depends on NVME_CORE
diff --git a/drivers/nvme/host/multipath.c b/drivers/nvme/host/multipath.c
index 6b12ca80aa27..cad76de2830a 100644
--- a/drivers/nvme/host/multipath.c
+++ b/drivers/nvme/host/multipath.c
@@ -10,10 +10,11 @@
#include "nvme.h"
bool multipath = true;
+#ifdef CONFIG_NVME_MULTIPATH_PARAM
module_param(multipath, bool, 0444);
MODULE_PARM_DESC(multipath,
"turn on native support for multiple controllers per subsystem");
-
+#endif
static const char *nvme_iopolicy_names[] = {
[NVME_IOPOLICY_NUMA] = "numa",
[NVME_IOPOLICY_RR] = "round-robin",
--
2.48.1
^ permalink raw reply related [flat|nested] 9+ messages in thread* Re: [PATCH v2 2/3] nvme-multipath: add the NVME_MULTIPATH_PARAM config option
2025-03-22 23:28 ` [PATCH v2 2/3] nvme-multipath: add the NVME_MULTIPATH_PARAM " John Meneghini
@ 2025-04-03 4:35 ` Christoph Hellwig
2025-04-04 22:28 ` John Meneghini
2025-04-14 20:19 ` Keith Busch
1 sibling, 1 reply; 9+ messages in thread
From: Christoph Hellwig @ 2025-04-03 4:35 UTC (permalink / raw)
To: John Meneghini
Cc: kbusch, hch, sagi, loberman, linux-nvme, linux-kernel, emilne,
bgurney
On Sat, Mar 22, 2025 at 07:28:47PM -0400, John Meneghini wrote:
> The new CONFIG_NVME_MULTIPATH_PARAM option controls the core_nvme.multipath
> parameter. When CONFIG_NVME_MULTIPATH_PARAM=n the multipath parameter is
> removed from the kernel and nvme multipathing is permanently enabled.
> When NVME_MULTIPATH_PARAM=y the nvme multipath parameter is added to the
> kernel and nvme multipath support is controlled by the
> core_nvme.multipath parameter.
So as stated before I hate these options with passion. On the other
hand both RH and SuSE stated they'd prefer to ship with the option
disabled, so I'd rather accomodate them rather than having to ship
patches for this which will then confuse folks why they are different
from upstream.
But:
> +config NVME_MULTIPATH_PARAM
> + bool "NVMe multipath param"
This isn't really a good config options description.
> + depends on NVME_CORE && NVME_MULTIPATH
> + default y
> + help
> + This option controls the inclusion of the NVMe core module
> + "multipath" parameter. If this option is disabled the
> + nvme_core.multipath parameter is excluded from the kernel.
> + If this option is enabled the nvme_core.multipath parameter
> + is included in the kernel.
So maybe invert the option to
config NVME_MULTIPATH_DISABLE
bool "Allow overriding the default nvme-multipath parameter"
help
This option controls the inclusion of the NVMe core module
"multipath" parameter. If this option is enabled the
nvme_core.multipath parameter is excluded from the kernel.
If this option is enabled the nvme_core.multipath parameter
See the nvme_core.multipath documentation why disabling
multipathing is generally harmful but there might be
exception reasons to do so anyway.
(assuming we already have the documentation mentioned, if not we
need to add it)
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH v2 2/3] nvme-multipath: add the NVME_MULTIPATH_PARAM config option
2025-04-03 4:35 ` Christoph Hellwig
@ 2025-04-04 22:28 ` John Meneghini
2025-04-07 15:01 ` Christoph Hellwig
0 siblings, 1 reply; 9+ messages in thread
From: John Meneghini @ 2025-04-04 22:28 UTC (permalink / raw)
To: Christoph Hellwig
Cc: kbusch, sagi, loberman, linux-nvme, linux-kernel, emilne, bgurney,
jmeneghi
On 4/3/25 12:35 AM, Christoph Hellwig wrote:
> On Sat, Mar 22, 2025 at 07:28:47PM -0400, John Meneghini wrote:
>> +config NVME_MULTIPATH_PARAM
>> + bool "NVMe multipath param"
>
> This isn't really a good config options description.
>
>> + depends on NVME_CORE && NVME_MULTIPATH
>> + default y
>> + help
>> + This option controls the inclusion of the NVMe core module
>> + "multipath" parameter. If this option is disabled the
>> + nvme_core.multipath parameter is excluded from the kernel.
>> + If this option is enabled the nvme_core.multipath parameter
>> + is included in the kernel.
>
> So maybe invert the option to
>
> config NVME_MULTIPATH_DISABLE
> bool "Allow overriding the default nvme-multipath parameter"
So the question is: do you want the core_nvme.multipath parameter
to be excluded by default, or included by default?
Keith and I agreed to call this CONFIG_NVME_DISBALE_MULTIPATH_PARAM.
However during testing I realized that many of the default make 'config'
rules would end up with CONFIG_NVME_DISBALE_MULTIPATH_PARAM=y,
even if I set the config rule to "default n".
For example:
make localmodconfig
make allmodconfig
would end up with compiling out the core_nvme.multipath parameter and I
don't think this is what we want.
If we want this new config option to provide no net change in the
default behavior, we need this to be the logic to be positive.
> help
> This option controls the inclusion of the NVMe core module
> "multipath" parameter. If this option is enabled the
> nvme_core.multipath parameter is excluded from the kernel.
> If this option is enabled the nvme_core.multipath parameter
How about something simple like this:
+config NVME_ENABLE_MULTIPATH_PARAM
+ bool "NVMe enable core_nvme.multipath param"
+ depends on NVME_CORE && NVME_MULTIPATH
+ default y
+ help
+ If this option is N the core_nvme.multipath parameter
+ is excluded from the kernel. If this option is Y the
+ core_nvme.multipath parameter is included in the kernel.
+
+ If unsure, say Y.
+
> See the nvme_core.multipath documentation why disabling
> multipathing is generally harmful but there might be
> exception reasons to do so anyway.
>
> (assuming we already have the documentation mentioned, if not we
> need to add it)
Yes, I will add some documentation about this. It looks like we currently
don't have any.
/John
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH v2 2/3] nvme-multipath: add the NVME_MULTIPATH_PARAM config option
2025-04-04 22:28 ` John Meneghini
@ 2025-04-07 15:01 ` Christoph Hellwig
0 siblings, 0 replies; 9+ messages in thread
From: Christoph Hellwig @ 2025-04-07 15:01 UTC (permalink / raw)
To: John Meneghini
Cc: Christoph Hellwig, kbusch, sagi, loberman, linux-nvme,
linux-kernel, emilne, bgurney
On Fri, Apr 04, 2025 at 06:28:10PM -0400, John Meneghini wrote:
>> So maybe invert the option to
>>
>> config NVME_MULTIPATH_DISABLE
>> bool "Allow overriding the default nvme-multipath parameter"
>
> So the question is: do you want the core_nvme.multipath parameter
> to be excluded by default, or included by default?
I can live with it either way.
> Keith and I agreed to call this CONFIG_NVME_DISBALE_MULTIPATH_PARAM.
> However during testing I realized that many of the default make 'config'
> rules would end up with CONFIG_NVME_DISBALE_MULTIPATH_PARAM=y,
> even if I set the config rule to "default n".
>
> For example:
>
> make localmodconfig
> make allmodconfig
>
> would end up with compiling out the core_nvme.multipath parameter and I
> don't think this is what we want.
Weird, how does that override the explicit default statement?
> How about something simple like this:
>
> +config NVME_ENABLE_MULTIPATH_PARAM
> + bool "NVMe enable core_nvme.multipath param"
> + depends on NVME_CORE && NVME_MULTIPATH
> + default y
"default y" is the default, so it can be skipped.
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH v2 2/3] nvme-multipath: add the NVME_MULTIPATH_PARAM config option
2025-03-22 23:28 ` [PATCH v2 2/3] nvme-multipath: add the NVME_MULTIPATH_PARAM " John Meneghini
2025-04-03 4:35 ` Christoph Hellwig
@ 2025-04-14 20:19 ` Keith Busch
1 sibling, 0 replies; 9+ messages in thread
From: Keith Busch @ 2025-04-14 20:19 UTC (permalink / raw)
To: John Meneghini
Cc: hch, sagi, loberman, linux-nvme, linux-kernel, emilne, bgurney
On Sat, Mar 22, 2025 at 07:28:47PM -0400, John Meneghini wrote:
> +config NVME_MULTIPATH_PARAM
> + bool "NVMe multipath param"
> + depends on NVME_CORE && NVME_MULTIPATH
> + default y
> + help
> + This option controls the inclusion of the NVMe core module
> + "multipath" parameter. If this option is disabled the
> + nvme_core.multipath parameter is excluded from the kernel.
> + If this option is enabled the nvme_core.multipath parameter
> + is included in the kernel.
> +
> + If unsure, say Y.
> +
> config NVME_VERBOSE_ERRORS
> bool "NVMe verbose error reporting"
> depends on NVME_CORE
> diff --git a/drivers/nvme/host/multipath.c b/drivers/nvme/host/multipath.c
> index 6b12ca80aa27..cad76de2830a 100644
> --- a/drivers/nvme/host/multipath.c
> +++ b/drivers/nvme/host/multipath.c
> @@ -10,10 +10,11 @@
> #include "nvme.h"
>
> bool multipath = true;
> +#ifdef CONFIG_NVME_MULTIPATH_PARAM
> module_param(multipath, bool, 0444);
> MODULE_PARM_DESC(multipath,
> "turn on native support for multiple controllers per subsystem");
> -
> +#endif
John,
Is this the logic and wording you want this option to be? You, or at
least somebody, suggested to rename it DISABLE_MULTIPATH", default "n".
The end result is just a matter of setting it accordingly; I just don't
want to stall getting your feature in over a miscommunication. Thanks!
^ permalink raw reply [flat|nested] 9+ messages in thread
* [PATCH v2 3/3] nvme: update the multipath warning in nvme_init_ns_head
2025-03-22 23:28 [PATCH v2 0/3] nvme: make core.nvme_multipath configurable John Meneghini
2025-03-22 23:28 ` [PATCH v2 1/3] nvme-multipath: change the NVME_MULTIPATH config option John Meneghini
2025-03-22 23:28 ` [PATCH v2 2/3] nvme-multipath: add the NVME_MULTIPATH_PARAM " John Meneghini
@ 2025-03-22 23:28 ` John Meneghini
2025-03-28 17:29 ` [PATCH v2 0/3] nvme: make core.nvme_multipath configurable Keith Busch
3 siblings, 0 replies; 9+ messages in thread
From: John Meneghini @ 2025-03-22 23:28 UTC (permalink / raw)
To: kbusch, hch, sagi
Cc: loberman, linux-nvme, linux-kernel, emilne, jmeneghi, bgurney
The new NVME_MULTIPATH_PARAM config option requires updates
to the warning message in nvme_init_ns_head().
Signed-off-by: John Meneghini <jmeneghi@redhat.com>
Tested-by: John Meneghini <jmeneghi@redhat.com>
---
drivers/nvme/host/core.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/nvme/host/core.c b/drivers/nvme/host/core.c
index 870314c52107..b2bd8e1673ac 100644
--- a/drivers/nvme/host/core.c
+++ b/drivers/nvme/host/core.c
@@ -3824,7 +3824,7 @@ static int nvme_init_ns_head(struct nvme_ns *ns, struct nvme_ns_info *info)
"Found shared namespace %d, but multipathing not supported.\n",
info->nsid);
dev_warn_once(ctrl->device,
- "Support for shared namespaces without CONFIG_NVME_MULTIPATH is deprecated and will be removed in Linux 6.0.\n");
+ "Shared namespace support requires core_nvme.multipath=Y.\n");
}
}
--
2.48.1
^ permalink raw reply related [flat|nested] 9+ messages in thread
* Re: [PATCH v2 0/3] nvme: make core.nvme_multipath configurable
2025-03-22 23:28 [PATCH v2 0/3] nvme: make core.nvme_multipath configurable John Meneghini
` (2 preceding siblings ...)
2025-03-22 23:28 ` [PATCH v2 3/3] nvme: update the multipath warning in nvme_init_ns_head John Meneghini
@ 2025-03-28 17:29 ` Keith Busch
3 siblings, 0 replies; 9+ messages in thread
From: Keith Busch @ 2025-03-28 17:29 UTC (permalink / raw)
To: John Meneghini
Cc: hch, sagi, loberman, linux-nvme, linux-kernel, emilne, bgurney
On Sat, Mar 22, 2025 at 07:28:45PM -0400, John Meneghini wrote:
> These patches propose an alternative to the outright removal of the nvme
> core multipath module parameter. Rather than deleting this module
> parameter we control its appearance with a new Kconfig option named
> NVME_MULTIPATH_PARAM
>
> Note that the default kernel config settings produce a kernel
> with no change in functionality. By default both NVME_MULTIPATH
> and NVME_MULTIPATH_PARAM are enabled and there are no user visable
> changes.
>
> To remove the core.nvme_multipath parameter simply compile with
> CONFIG_NVME_MULTIPATH_PARAM=n.
Thanks, patches 1 and 3 are applied.
Lacking a better way to handle your situation, we can add patch 2. But I
recall you wanted to invert the logic and option name, so I'll wait for
that.
^ permalink raw reply [flat|nested] 9+ messages in thread