All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2 0/3] nvme: make core.nvme_multipath configurable
@ 2025-03-22 23:28 John Meneghini
  2025-03-22 23:28 ` [PATCH v2 1/3] nvme-multipath: change the NVME_MULTIPATH config option John Meneghini
                   ` (3 more replies)
  0 siblings, 4 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

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.

Note: the current behavior of nvme-v6.15

  CONFIG_NVME_MULTIPATH=y and nvme_core.multipath=N

  [  182.863531] nvme nvme4: Found shared namespace 1, but multipathing not supported.
  [  182.871030] nvme nvme4: Support for shared namespaces without CONFIG_NVME_MULTIPATH is deprecated and will be removed in Linux 6.0.

Closes: https://lore.kernel.org/linux-nvme/20241121220321.40616-1-bgurney@redhat.com/
Closes: https://lore.kernel.org/linux-nvme/20250204211158.43126-1-bgurney@redhat.com/
Closes: https://lore.kernel.org/linux-nvme/20250228032541.369804-1-jmeneghi@redhat.com/ 

Changes Since v1

Rebased patches to nvme-v6.15

  nvme: add mulitipath warning to nvme_alloc_ns

Dropped this patch because the dmesg it produced was redundant and not
needed. Testing multiport devices with CONFIG_NVME_MULTIPATH disabled
show the following console message at boot.

[167523.157284] nvme nvme5: Found shared namespace 1, but multipathing not supported.
[167523.217083] nvme nvme6: Please enable CONFIG_NVME_MULTIPATH for full support of multi-port devices.

  nvme-multipath: add the NVME_MULTIPATH_PARAM config option

Fixed up the Kconfig description for NVME_MULTIPATH_PARAM.
Add default y and tested the follow Kconfig options.

Tested the following:

  make mod2noconfig
  make allyesconfig
  make allmodconfig
  make olddefconfig
  make oldconfig - accept all defaults

No change in current behavior.

  nvme: update the multipath warning in nvme_init_ns_head

Tests ran with CONFIG_NVME_MULTIPATH=y and CONFIG_NVME_MULTIPATH_PARM=n

No change in current behavior except:

  [root@rhel-storage-108 ~]# cat /sys/module/nvme_core/parameters/multipath
  cat: /sys/module/nvme_core/parameters/multipath: No such file or directory
  
The following does nothing, just like it does when CONFIG_NVME_MULTIPATH=n

  [root@rhel-storage-108 ~]# grubby --update-kernel=ALL --args="nvme_core.multipath=N"
  [root@rhel-storage-108 ~]# reboot now
  .
  .
  .
  [root@rhel-storage-108 ~]# cat /proc/cmdline
  BOOT_IMAGE=(hd1,gpt2)/vmlinuz-6.14.0-rc2_config_ana4a+ ...  nvme_core.multipath=N
  [root@rhel-storage-108 ~]# cat /sys/module/nvme_core/parameters/multipath
  cat: /sys/module/nvme_core/parameters/multipath: No such file or directory

Tests ran with CONFIG_NVME_MULTIPATH=y and CONFIG_NVME_MULTIPATH_PARM=y

  There is no change in current behavior:

Tests ran with CONFIG_NVME_MULTIPATH=y, CONFIG_NVME_MULTIPATH_PARM=y
and nvme_core.multipath=N

  [  372.040105] nvme nvme4: Found shared namespace 1, but multipathing not supported.
  [  372.047606] nvme nvme4: Shared namespace support requires core_nvme.multipath=Y.
                             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
			                   new message
  [  372.105469] nvme nvme5: creating 2 I/O queues.
  [  372.110383] nvme nvme5: mapped 2/0/0 default/read/poll queues.
  [  372.125480] nvme nvme5: new ctrl: NQN ....
  [  372.166081] nvme nvme5: Found shared namespace 1, but multipathing not supported.
  [  372.235964] nvme nvme6: creating 2 I/O queues.
  [  372.240926] nvme nvme6: mapped 2/0/0 default/read/poll queues.
  [  372.255964] nvme nvme6: new ctrl: NQN ....
  [root@rhel-storage-108 ~]# cat /sys/module/nvme_core/parameters/multipath
  N
  [root@rhel-storage-108 ~]# grubby --remove-args="nvme_core.multipath=N" --update-kernel=ALL
  [root@rhel-storage-108 ~]# grubby --info=ALL | grep nvme_core 
  [root@rhel-storage-108 ~]# reboot now
  .
  .
  .
  [root@rhel-storage-108 ~]# cat /sys/module/nvme_core/parameters/multipath
  Y



John Meneghini (3):
  nvme-multipath: change the NVME_MULTIPATH config option
  nvme-multipath: add the NVME_MULTIPATH_PARAM config option
  nvme: update the multipath warning in nvme_init_ns_head

 drivers/nvme/host/Kconfig     | 26 ++++++++++++++++++++++----
 drivers/nvme/host/core.c      |  2 +-
 drivers/nvme/host/multipath.c |  3 ++-
 3 files changed, 25 insertions(+), 6 deletions(-)

-- 
2.48.1



^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2025-04-14 20:19 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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-04-03  4:35   ` Christoph Hellwig
2025-04-04 22:28     ` John Meneghini
2025-04-07 15:01       ` 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

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.