Skip to contentSkip to conversation

multipath-tools: simplify defaults for NVMe

RFC PATCH In review [email protected] 2 participants 6 messages Jun 1, 2022 – Jun 8, 2022 Device mapper

lore
Share & tools
lore
#0 lore raw

cover multipath-tools: simplify defaults for NVMe

From: Martin Wilck <[email protected]>

Using dm-multipath with NVMe devices is increasingly becoming a niche configuration, as it's recommended against by the kernel community and various vendors. Some vendors would prefer not to see their devices listed in the libmultipath hwtable to avoid the impression on users that this setup was supported by the vendor.

This RFC patch set makes it possible to remove multiple recently added hwtable entries by changing the generic NVMe defaults. The only device-specific settings that remain are those for no_path_retry.

Martin Wilck (2):
libmultipath: hwtable: new defaults for NVMe
libmultipath: hwtable: remove obsolete NVMe entries

 libmultipath/hwtable.c | 30 ++----------------------------
 1 file changed, 2 insertions(+), 28 deletions(-)
Signature · 6 lines
2.36.1

--
dm-devel mailing list
[email protected]
https://listman.redhat.com/mailman/listinfo/dm-devel
#1 lore raw

PATCH 1/2 libmultipath: hwtable: new defaults for NVMe

From: Martin Wilck <[email protected]>

So far we were using the general defaults (pgpolicy = FAILOVER, pgfailback = -FAILBACK_MANUAL). Xosé's late patches were setting this to either MULTIBUS or ANA, and -FAILBACK_IMMEDIATE, respectively for most specific arrays. At the same time, some vendors don't like seeing their NVMe arrays listed specifically in the multipath-tools hwtable.

IMO it makes sense to change the general defaults.

detect_prio is the default, and we probe for ANA support. Thus prio will be "ana" for arrays that support it, and "const" otherwise. With "const", GROUP_BY_PRIO degenerates to MULTIBUS, and pgfailback won't happen anyway. This way, our defaults match most Xosé's new entries. The only devices for which this patch changes behavior (from FAILOVER to MULTIBUS) are those generic devices that aren't listed, and don't support ANA.

I considered changing the default for no_path_retry, too, but decided against it. The default is "fail", and users who dislike that will need to change it. no_path_retry is more a policy setting than a hardware property, anyway.

---
 libmultipath/hwtable.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
libmultipath/hwtable.c +2 -1
index 39daadc..e0dce84 100644
@@ -90,7 +90,8 @@ static struct hwentry default_hw[] = {
 		.product       = ".*",
 		.uid_attribute = DEFAULT_NVME_UID_ATTRIBUTE,
 		.checker_name  = NONE,
-		.retain_hwhandler = RETAIN_HWHANDLER_OFF,
+		.pgpolicy      = GROUP_BY_PRIO,
+		.pgfailback    = -FAILBACK_IMMEDIATE,
 	},
 	/*
 	 * Apple
Signature · 6 lines
2.36.1

--
dm-devel mailing list
[email protected]
https://listman.redhat.com/mailman/listinfo/dm-devel
#2 lore raw

Re: [dm-devel] [PATCH 1/2] libmultipath: hwtable: new defaults for NVMe

Quoted 18 lines · On Wed, Jun 01, 2022 at 10:26:27PM +0200, [email protected] wrote:

From: Martin Wilck <[email protected]>

So far we were using the general defaults (pgpolicy = FAILOVER, pgfailback = -FAILBACK_MANUAL). Xosé's late patches were setting this to either MULTIBUS or ANA, and -FAILBACK_IMMEDIATE, respectively for most specific arrays. At the same time, some vendors don't like seeing their NVMe arrays listed specifically in the multipath-tools hwtable.

IMO it makes sense to change the general defaults.

detect_prio is the default, and we probe for ANA support. Thus prio will be "ana" for arrays that support it, and "const" otherwise. With "const", GROUP_BY_PRIO degenerates to MULTIBUS, and pgfailback won't happen anyway. This way, our defaults match most Xosé's new entries. The only devices for which this patch changes behavior (from FAILOVER to MULTIBUS) are those generic devices that aren't listed, and don't support ANA.

Quoted 3 lines

I considered changing the default for no_path_retry, too, but decided against it. The default is "fail", and users who dislike that will need to change it. no_path_retry is more a policy setting than a hardware property, anyway.

I agree that these new defaults are sensible, but this patch will cause some user's arrays to change configuration when they update. I'm not against doing this at all, but this is one of those patches that distributions need to take some care with, so that they can make this change at a sensible time.

So, unless there are other objections, I'm O.k. with this patch set, I just wanted to point this out.

-Ben

Quoted 20 lines
---
 libmultipath/hwtable.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
libmultipath/hwtable.c +2 -1
index 39daadc..e0dce84 100644
@@ -90,7 +90,8 @@ static struct hwentry default_hw[] = {
 		.product       = ".*",
 		.uid_attribute = DEFAULT_NVME_UID_ATTRIBUTE,
 		.checker_name  = NONE,
-		.retain_hwhandler = RETAIN_HWHANDLER_OFF,
+		.pgpolicy      = GROUP_BY_PRIO,
+		.pgfailback    = -FAILBACK_IMMEDIATE,
 	},
 	/*
 	 * Apple
Signature · 1 line
2.36.1

--
dm-devel mailing list
[email protected]
https://listman.redhat.com/mailman/listinfo/dm-devel

#3 lore raw

Re: [dm-devel] [PATCH 1/2] libmultipath: hwtable: new defaults for NVMe

Quoted 37 lines · Benjamin Marzinski
Quoted 22 lines · On Wed, Jun 01, 2022 at 10:26:27PM +0200, [email protected] wrote:

From: Martin Wilck <[email protected]>

So far we were using the general defaults (pgpolicy = FAILOVER, pgfailback = -FAILBACK_MANUAL). Xosé's late patches were setting this to
either MULTIBUS or ANA, and -FAILBACK_IMMEDIATE, respectively for most specific arrays. At the same time, some vendors don't like seeing their NVMe arrays listed specifically in the multipath-tools hwtable.

IMO it makes sense to change the general defaults.

detect_prio is the default, and we probe for ANA support. Thus prio will be "ana" for arrays that support it, and "const" otherwise. With "const", GROUP_BY_PRIO degenerates to MULTIBUS, and pgfailback won't happen anyway. This way, our defaults match most Xosé's new entries. The
only devices for which this patch changes behavior (from FAILOVER to MULTIBUS)
are those generic devices that aren't listed, and don't support ANA.

Quoted 6 lines

I considered changing the default for no_path_retry, too, but decided against
it. The default is "fail", and users who dislike that will need to change it.
no_path_retry is more a policy setting than a hardware property, anyway.

I agree that these new defaults are sensible, but this patch will cause
some user's arrays to change configuration when they update.  I'm not against doing this at all, but this is one of those patches that distributions need to take some care with, so that they can make this change at a sensible time.

Quoted 3 lines

So, unless there are other objections, I'm O.k. with this patch set, I
just wanted to point this out.

Understood. I believe everyone understands that Linux distributions may, and will, sometimes use device defaults that are different from upstream, especially in cases where backward compatibility matters more than anything else.

The main motivation behind this patch was to avoid mentioning certain NVMe devices explicitly in the _upstream_ hwtable. Simplification, and a slight improvement of the actual defaults, is a side effect.

If you don't mind, I'd appreciated a Reviewed-by ;-)

Martin

Quoted 7 lines

-Ben

Quoted 4 lines

---
 libmultipath/hwtable.c | 3 ++-

 1 file changed, 2 insertions(+), 1 deletion(-)
Quoted 17 lines
Quoted 16 lines
libmultipath/hwtable.c +2 -1
index 39daadc..e0dce84 100644
@@ -90,7 +90,8 @@ static struct hwentry default_hw[] = {
                 .product       = ".*",
                 .uid_attribute = DEFAULT_NVME_UID_ATTRIBUTE,
                 .checker_name  = NONE,
-               .retain_hwhandler = RETAIN_HWHANDLER_OFF,
+               .pgpolicy      = GROUP_BY_PRIO,
+               .pgfailback    = -FAILBACK_IMMEDIATE,
         },
         /*
          * Apple
Signature · 1 line
2.36.1

--
dm-devel mailing list
[email protected]
https://listman.redhat.com/mailman/listinfo/dm-devel

#4 lore raw

PATCH 2/2 libmultipath: hwtable: remove obsolete NVMe entries

In reply to [email protected]

From: Martin Wilck <[email protected]>

With the previous patch, lots of specific settings for NVMe devices can be removed, because they match the general NVMe defaults. E-Series NVMe is removed entirely.

---
 libmultipath/hwtable.c | 27 ---------------------------
 1 file changed, 27 deletions(-)
libmultipath/hwtable.c +0 -27
index e0dce84..fd4573f 100644
@@ -124,7 +124,6 @@ static struct hwentry default_hw[] = {
 		/* Alletra 9000 NVMe */
 		.vendor        = "NVME",
 		.product       = "HPE Alletra",
-		.pgpolicy      = MULTIBUS,
 		.no_path_retry = NO_PATH_RETRY_QUEUE,
 	},
 	{
@@ -387,12 +386,6 @@ static struct hwentry default_hw[] = {
 		.pgfailback    = -FAILBACK_IMMEDIATE,
 		.no_path_retry = 30,
 	},
-	{
-		/* EMC PowerMax NVMe */
-		.vendor        = "NVME",
-		.product       = "^EMC PowerMax_",
-		.pgpolicy      = MULTIBUS,
-	},
 	{
 		/* PowerStore */
 		.vendor        = "DellEMC",
@@ -408,9 +401,6 @@ static struct hwentry default_hw[] = {
 		/* PowerStore NVMe */
 		.vendor        = ".*",
 		.product       = "dellemc-powerstore",
-		.pgpolicy      = GROUP_BY_PRIO,
-		.prio_name     = PRIO_ANA,
-		.pgfailback    = -FAILBACK_IMMEDIATE,
 		.no_path_retry = 3,
 	},
 	{
@@ -482,9 +472,6 @@ static struct hwentry default_hw[] = {
 		/* ETERNUS AB/HB NVMe */
 		.vendor        = "NVME",
 		.product       = "Fujitsu ETERNUS AB/HB Series",
-		.pgpolicy      = GROUP_BY_PRIO,
-		.prio_name     = PRIO_ANA,
-		.pgfailback    = -FAILBACK_IMMEDIATE,
 		.no_path_retry = 30,
 	},
 	/*
@@ -703,7 +690,6 @@ static struct hwentry default_hw[] = {
 		/* FlashSystem(Storwize/SVC) NVMe */
 		.vendor        = "NVME",
 		.product       = "IBM[ ]+2145",
-		.pgpolicy      = MULTIBUS,
 		.no_path_retry = NO_PATH_RETRY_QUEUE,
 	},
 	{
@@ -763,7 +749,6 @@ static struct hwentry default_hw[] = {
 		/* FlashSystem(RamSan) NVMe */
 		.vendor        = "NVMe",
 		.product       = "FlashSystem",
-		.pgpolicy      = MULTIBUS,
 		.no_path_retry = NO_PATH_RETRY_FAIL,
 	},
 	{
@@ -875,18 +860,8 @@ static struct hwentry default_hw[] = {
 		/* ONTAP NVMe */
 		.vendor        = "NVME",
 		.product       = "^NetApp ONTAP Controller",
-		.pgpolicy      = MULTIBUS,
 		.no_path_retry = NO_PATH_RETRY_QUEUE,
 	},
-	{
-		/* E-Series NVMe */
-		.vendor        = "NVME",
-		.product       = "NetApp E-Series",
-		.pgpolicy      = GROUP_BY_PRIO,
-		.prio_name     = PRIO_ANA,
-		.pgfailback    = -FAILBACK_IMMEDIATE,
-		.no_path_retry = 30,
-	},
 	/*
 	 * NEC
 	 */
@@ -1130,7 +1105,6 @@ static struct hwentry default_hw[] = {
 		/* FlashArray NVMe */
 		.vendor        = "NVME",
 		.product       = "Pure Storage FlashArray",
-		.pgpolicy      = MULTIBUS,
 		.no_path_retry = 10,
 	},
 	/*
@@ -1150,7 +1124,6 @@ static struct hwentry default_hw[] = {
 		/* OceanStor NVMe */
 		.vendor        = "NVME",
 		.product       = "Huawei-XSG1",
-		.pgpolicy      = MULTIBUS,
 		.checker_name  = DIRECTIO,
 		.no_path_retry = 12,
 	},
Signature · 6 lines
2.36.1

--
dm-devel mailing list
[email protected]
https://listman.redhat.com/mailman/listinfo/dm-devel
maintainer Reviewed-by on the v1 series
#5 lore raw
In reply to [email protected]
Quoted 11 lines · On Wed, Jun 01, 2022 at 10:26:26PM +0200, [email protected] wrote:

From: Martin Wilck <[email protected]>

Using dm-multipath with NVMe devices is increasingly becoming a niche configuration, as it's recommended against by the kernel community and various vendors. Some vendors would prefer not to see their devices listed in the libmultipath hwtable to avoid the impression on users that this setup was supported by the vendor.

This RFC patch set makes it possible to remove multiple recently added hwtable entries by changing the generic NVMe defaults. The only device-specific settings that remain are those for no_path_retry.

For the set:

Quoted 10 lines

Martin Wilck (2):
libmultipath: hwtable: new defaults for NVMe
libmultipath: hwtable: remove obsolete NVMe entries

 libmultipath/hwtable.c | 30 ++----------------------------
 1 file changed, 2 insertions(+), 28 deletions(-)
Signature · 1 line
2.36.1

--
dm-devel mailing list
[email protected]
https://listman.redhat.com/mailman/listinfo/dm-devel