View Issue Details

IDProjectCategoryView StatusLast Update
0000861channel: kernel/el7kernel-mlpublic2018-06-27 09:49
Reportertoracat Assigned Toburakkucat  
PrioritynormalSeverityminorReproducibilityN/A
Status resolvedResolutionfixed 
Summary0000861: Adjust NVME-related options to match the distro kernel
Descriptionkernel-3.10.0-862.3.3.el7

CONFIG_NVME_CORE=m
CONFIG_BLK_DEV_NVME=m
CONFIG_BLK_DEV_NVME_SCSI=y
CONFIG_NVME_FABRICS=m
CONFIG_NVME_RDMA=m
CONFIG_NVME_FC=m
CONFIG_NVME_TARGET=m
CONFIG_NVME_TARGET_LOOP=m
CONFIG_NVME_TARGET_RDMA=m
CONFIG_NVME_TARGET_FC=m
CONFIG_NVME_TARGET_FCLOOP=m

kernel-ml-4.17.2-1.el7.elrepo

# NVME Support
CONFIG_NVME_CORE=y
CONFIG_BLK_DEV_NVME=y
# CONFIG_NVME_MULTIPATH is not set
CONFIG_NVME_FABRICS=m
CONFIG_NVME_RDMA=m
CONFIG_NVME_FC=m
CONFIG_NVME_TARGET=m
CONFIG_NVME_TARGET_LOOP=m
CONFIG_NVME_TARGET_RDMA=m
CONFIG_NVME_TARGET_FC=m
# CONFIG_NVME_TARGET_FCLOOP is not set

Most important change to make will be:

CONFIG_NVME_CORE=y to CONFIG_NVME_CORE=m

so that the nvme.ko becomes a loadable module.
TagsNo tags attached.

Activities

toracat

2018-06-20 23:06

administrator   ~0005947

Will be good if kernel-lt is also looked at.

burakkucat

2018-06-21 10:44

administrator   ~0005948

Thank you for your report.

Looking at the master configuration files for both kernel-ml & kernel-lt (both EL7 & EL6), using a double-grep, we see --

[kernels]$ grep -r NVME * | sort | grep CORE
el6/config-4.17/config-4.17.0-i686:CONFIG_NVME_CORE=y
el6/config-4.17/config-4.17.0-i686-NONPAE:CONFIG_NVME_CORE=y
el6/config-4.17/config-4.17.0-x86_64:CONFIG_NVME_CORE=y
el6/config-4.17/config-4.17.1-i686:CONFIG_NVME_CORE=y
el6/config-4.17/config-4.17.1-i686-NONPAE:CONFIG_NVME_CORE=y
el6/config-4.17/config-4.17.1-x86_64:CONFIG_NVME_CORE=y
el6/config-4.17/config-4.17.2-i686:CONFIG_NVME_CORE=y
el6/config-4.17/config-4.17.2-i686-NONPAE:CONFIG_NVME_CORE=y
el6/config-4.17/config-4.17.2-x86_64:CONFIG_NVME_CORE=y
el6/config-4.18/config-4.18.0-i686:CONFIG_NVME_CORE=y
el6/config-4.18/config-4.18.0-i686-NONPAE:CONFIG_NVME_CORE=y
el6/config-4.18/config-4.18.0-x86_64:CONFIG_NVME_CORE=y
el7/config-4.17/config-4.17.0-x86_64:CONFIG_NVME_CORE=y
el7/config-4.17/config-4.17.1-x86_64:CONFIG_NVME_CORE=y
el7/config-4.17/config-4.17.2-x86_64:CONFIG_NVME_CORE=y
el7/config-4.18/config-4.18.0-x86_64:CONFIG_NVME_CORE=y
[kernels]$

Applying a similar search to the EL7 distribution kernel configuration files shows --

[kernels]$ grep NVME /boot/config* | sort | grep CORE
/boot/config-3.10.0-862.2.3.el7.x86_64:CONFIG_NVME_CORE=m
/boot/config-3.10.0-862.3.2.el7.x86_64:CONFIG_NVME_CORE=m
/boot/config-3.10.0-862.3.3.el7.x86_64:CONFIG_NVME_CORE=m
[kernels]$

Applying a similar search to the EL6 distribution kernel configuration files shows --

[kernels]$ grep NVME /boot/config* | sort | grep CORE
[kernels]$

We will attempt to incorporate the required configuration change in the next build of the kernel-ml (EL7 & EL6) package sets.

The configuration files for kernel-lt (EL7 & EL6) will also be examined.

burakkucat

2018-06-21 17:24

administrator   ~0005950

Looking at the configuration file of kernel-ml-4.18.0-0.rc1.el7.elrepo --

BLK_DEV_NVME is set as "Y" by NVM [=y] && BLOCK [=y] && HAS_DMA [=y] && PCI [=y].

NVME_CORE is set as "Y" by BLK_DEV_NVME [=y].

----------

Looking at the configuration file of kernel-ml-4.17.2-1.el7.elrepo --

BLK_DEV_NVME is set as "Y" by NVM [=y] && BLOCK [=y] && HAS_DMA [=y] && PCI [=y].

NVME_CORE is set as "Y" by BLK_DEV_NVME [=y].

----------

Looking at the configuration file of kernel-lt-4.4.138-1.el7.elrepo --

BLK_DEV_NVME is set as "M" from the "Device Drivers" sub-menu.

The NVME_CORE option does not exist.

----------

I do not seem able to set NVME_CORE as "M" for kernel-ml.

Any suggestions, please?

toracat

2018-06-21 18:53

administrator   ~0005953

The drivers/nvme/host/Kconfig file (both 3.10.x and 4.17) states:

config NVME_CORE
        tristate

config BLK_DEV_NVME
        tristate "NVM Express block device"
        depends on PCI && BLOCK
        select NVME_CORE
        ---help---
          The NVM Express driver is for solid state drives directly
          connected to the PCI or PCI Express bus. If you know you
          don't have one of these, it is safe to answer N.

          To compile this driver as a module, choose M here: the
          module will be called nvme.

So, BLK_DEV_NVME seems to provide the "nvme" driver. And it says "choose M". However as you figured out, BLK_DEV_NVME=y in kernel-ml and no way to set it as M.

burakkucat

2018-06-22 08:50

administrator   ~0005954

Last edited: 2018-06-22 08:52

After a period of further analysis, it has been determined how CONFIG_NVME_CORE=m may be set.

Here follows my notes --

----------

Device Drivers -> Open-Channel SSD target support (CONFIG_NVM [Y|N])

Device Drivers -> NVME Express block device (CONFIG_BLK_DEV_NVME [Y|m|N])

----------

If CONFIG_NVM=Y then CONFIG_BLK_DEV_NVME can be set either [Y] or [N].

If CONFIG_NVM=N then CONFIG_BLK_DEV_NVME can be set either [Y], [m] or [N].

If CONFIG_BLK_DEV_NVME=Y then CONFIG_NVME_CORE is forced [Y].

If CONFIG_BLK_DEV_NAME=m then CONFIG_NVME_CORE is forced [m].

If CONFIG_BLK_DEV_NAME=N then CONFIG_NVME_CORE is forced [m].

----------

The following sdiff shows the minimum changes that are
required for CONFIG_NVME_CORE to be forced [m].

[linux-4.17.2-1.el7.elrepo.x86_64]$ sdiff -s .config.old .config
CONFIG_NVME_CORE=y | CONFIG_NVME_CORE=m
CONFIG_BLK_DEV_NVME=y | CONFIG_BLK_DEV_NVME=m
CONFIG_NVM=y | # CONFIG_NVM is not set
# CONFIG_NVM_DEBUG is not set <
CONFIG_NVM_PBLK=m <
[linux-4.17.2-1.el7.elrepo.x86_64]$

----------

toracat

2018-06-22 09:30

administrator   ~0005955

Excellent analysis! I look forward to the next update. :)

burakkucat

2018-06-22 11:15

administrator   ~0005958

There are two options currently not set in the kernel-ml configuration. Quoting from the relevant Kconfig files --

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 namespaces,
even if it is accessible through multiple controllers.

 -- and --

config NVME_TARGET_FCLOOP
tristate "NVMe over Fabrics FC Transport Loopback Test driver"
depends on NVME_TARGET
select NVME_CORE
select NVME_FABRICS
select SG_POOL
depends on NVME_FC
depends on NVME_TARGET_FC
---help---
This enables the NVMe FC loopback test support, which can be useful
to test NVMe-FC transport interfaces.

If unsure, say N.

Would enabling one (or both) be appropriate? My feeling is that as they have not been requested, with a supporting proof of need, I should keep them unset.

toracat

2018-06-22 16:56

administrator   ~0005959

TARGET_FCLOOP=m in the distro kernel, so enable this one? Regarding NVME_MULTIPATH I'd wait until we hear a request.

burakkucat

2018-06-23 10:31

administrator   ~0005960

Confirming that CONFIG_NVME_TARGET_FCLOOP=m will be added to the relevant kernel-ml configuration files.

burakkucat

2018-06-27 09:49

administrator   ~0005962

The recently released kernel-ml-4.17.3 package sets for EL6 [1] and EL7 [2] have had the following adjustment made to their respective configuration files --

CONFIG_NVME_TARGET_FCLOOP=m

Now closing as "resolved/fixed".

[1] http://lists.elrepo.org/pipermail/elrepo/2018-June/004318.html
[2] http://lists.elrepo.org/pipermail/elrepo/2018-June/004319.html

Issue History

Date Modified Username Field Change
2018-06-20 23:03 toracat New Issue
2018-06-20 23:03 toracat Status new => assigned
2018-06-20 23:03 toracat Assigned To => burakkucat
2018-06-20 23:06 toracat Note Added: 0005947
2018-06-21 10:44 burakkucat Note Added: 0005948
2018-06-21 17:24 burakkucat Note Added: 0005950
2018-06-21 18:53 toracat Note Added: 0005953
2018-06-22 08:50 burakkucat Note Added: 0005954
2018-06-22 08:52 burakkucat Note Edited: 0005954
2018-06-22 09:30 toracat Note Added: 0005955
2018-06-22 11:15 burakkucat Note Added: 0005958
2018-06-22 16:56 toracat Note Added: 0005959
2018-06-23 10:31 burakkucat Note Added: 0005960
2018-06-27 09:49 burakkucat Note Added: 0005962
2018-06-27 09:49 burakkucat Status assigned => resolved
2018-06-27 09:49 burakkucat Resolution open => fixed