multipath.conf(5): remove io-affinity information
Benjamin Marzinski
maintainerPATCH 1/2 multipath.conf(5): remove io-affinity information
The multpath-tools do not support the io-affinity path selector. We always add a repeat count as the path argument. The io-affinity selector doesn't take one. Instead it takes a bitmap of CPUs that a path can run on. This isn't something that lends itself to the kind of auto-assembling that multipathd does. But even if we did want to try to support this path-selector, until we do, we shouldn't be listing it in the multipath.conf documentation.
--- multipath/multipath.conf.5 | 4 ---- 1 file changed, 4 deletions(-)
multipath/multipath.conf.5 +0 -4
@@ -205,10 +205,6 @@ of outstanding I/O to the path and its relative throughput. estimation of future service time based on the history of previous I/O submitted to each path. .TP -.I "io-affinity 0" -(Since 5.11 kernel) Choose the path for the next bunch of I/O based on a CPU to -path mapping the user passes in and what CPU we are executing on. -.TP The default is: \fBservice-time 0\fR .RE .
Signature · 6 lines
2.17.2 -- dm-devel mailing list [email protected] https://listman.redhat.com/mailman/listinfo/dm-devel
Benjamin Marzinski
maintainerPATCH 2/2 libmpathpersist: fix command keyword ordering
When libmpathpersist was communicating with multipathd, it wasn't using the correct keyword order for the commands, as specified in the CLI commands reference. Since commit f812466f, multipathd requires commands to be ordered correctly. Fix the ordering.
--- libmpathpersist/mpath_updatepr.c | 23 ++++++++++++----------- 1 file changed, 12 insertions(+), 11 deletions(-)
libmpathpersist/mpath_updatepr.c +12 -11
@@ -18,7 +18,7 @@#include "mpathpr.h" -static int do_update_pr (char *alias,char *arg) +static int do_update_pr (char *alias,char *cmd,char *key) {int fd;char str[256 ];
@@ -31,7 +31,10 @@ static int do_update_pr(char *alias, char *arg)return -1 ; } -snprintf (str,sizeof (str),"map %s %s" , alias, arg); +if (key) +snprintf (str,sizeof (str),"%s map %s key %s" , cmd, alias, key); +else +snprintf (str,sizeof (str),"%s map %s" , cmd, alias);condlog (2 ,"%s: pr message=%s" , alias, str);if (send_packet (fd, str) !=0 ) {condlog (2 ,"%s: message=%s send error=%d" , alias, str, errno);
@@ -56,18 +59,16 @@ static int do_update_pr(char *alias, char *arg) }int update_prflag (char *mapname,int set) { -return do_update_pr (mapname, (set)?"setprstatus" :"unsetprstatus" ); +return do_update_pr (mapname, (set)?"setprstatus" :"unsetprstatus" , +NULL ); }int update_prkey_flags (char *mapname,uint64_t prkey,uint8_t sa_flags) {char str[256 ]; -char *flagstr ="" ; -if (sa_flags &MPATH_F_APTPL_MASK ) - flagstr =":aptpl" ; -if (prkey) -sprintf (str,"setprkey key %" PRIx64"%s" , prkey, flagstr); -else -sprintf (str,"unsetprkey" ); -return do_update_pr (mapname, str); +if (!prkey) +return do_update_pr (mapname,"unsetprkey" ,NULL ); +sprintf (str,"%" PRIx64"%s" , prkey, + (sa_flags &MPATH_F_APTPL_MASK ) ?":aptpl" :"" ); +return do_update_pr (mapname,"setprkey" , str); }
Signature · 6 lines
2.17.2 -- dm-devel mailing list [email protected] https://listman.redhat.com/mailman/listinfo/dm-devel
Re: [dm-devel] [PATCH 2/2] libmpathpersist: fix command keyword ordering
Quoted 11 lines · Benjamin Marzinski
When libmpathpersist was communicating with multipathd, it wasn't using
the correct keyword order for the commands, as specified in the CLI commands reference. Since commitf812466f, multipathd requires commands
to be ordered correctly. Fix the ordering.Fixes f812466f ("multipathd: more robust command parsing")Reported-by miaoguanqin <[email protected]>Cc lixiaokeng <[email protected]>Signed-off-by Benjamin Marzinski <[email protected]>
Quoted 54 lines
---
libmpathpersist/mpath_updatepr.c | 23 ++++++++++++-----------1 file changed, 12 insertions(+), 11 deletions(-)libmpathpersist/mpath_updatepr.c +0
-0@@ -18,7 +18,7 @@ #include "mpathpr.h"
libmpathpersist/mpath_updatepr.c +1
-1-static int do_update_pr (char *alias,char *arg) +static int do_update_pr (char *alias,char *cmd,char *key){
int fd;
char str[256];libmpathpersist/mpath_updatepr.c +0
-0@@ -31,7 +31,10 @@ static int do_update_pr(char *alias, char *arg) return -1; }
- snprintf(str,sizeof(str),"map %s %s", alias, arg); + if (key)
+ snprintf(str,sizeof(str),"%s map %s key %s", cmd, alias, key);
+ else
+ snprintf(str,sizeof(str),"%s map %s", cmd, alias); condlog (2, "%s: pr message=%s", alias, str); if (send_packet(fd, str)!= 0) {
condlog(2, "%s: message=%s send error=%d", alias, str, errno);libmpathpersist/mpath_updatepr.c +0
-0@@ -56,18 +59,16 @@ static int do_update_pr(char *alias, char *arg) }
intupdate_prflag(char *mapname, int set){
- return do_update_pr(mapname, (set)? "setprstatus" :
"unsetprstatus");
+ return do_update_pr(mapname, (set)? "setprstatus" :
"unsetprstatus",
+ NULL);
}
intupdate_prkey_flags(char *mapname, uint64_t prkey, uint8_t sa_flags){
char str[256];
- char *flagstr = "";
- if (sa_flags&MPATH_F_APTPL_MASK)
- flagstr = ":aptpl";
- if (prkey)
- sprintf(str, "setprkey key %" PRIx64 "%s", prkey, flagstr);
- else
Quoted 8 lines
- sprintf(str, "unsetprkey");
- returndo_update_pr(mapname, str);
+ if (!prkey)
+ returndo_update_pr(mapname, "unsetprkey", NULL); + sprintf(str, "%" PRIx64 "%s", prkey,
+ (sa_flags &MPATH_F_APTPL_MASK) ? ":aptpl" : ""); + returndo_update_pr(mapname, "setprkey", str); }
--
dm-devel mailing list
[email protected]
https://listman.redhat.com/mailman/listinfo/dm-devel
Quoted 12 lines · Benjamin Marzinski
The multpath-tools do not support the io-affinity path selector. We always add a repeat count as the path argument. The io-affinity selector
doesn't take one. Instead it takes a bitmap of CPUs that a path can run
on. This isn't something that lends itself to the kind of auto-assembling that multipathd does. But even if we did want to try to
support this path-selector, until we do, we shouldn't be listing it in
the multipath.conf documentation.
Quoted 1 line
Signed-off-by Benjamin Marzinski <[email protected]>
--
dm-devel mailing list
[email protected]
https://listman.redhat.com/mailman/listinfo/dm-devel
Quoted 19 lines · bmarzins at redhat.com (Benjamin Marzinski)
The multpath-tools do not support the io-affinity path selector. We always add a repeat count as the path argument. The io-affinity selector doesn't take one. Instead it takes a bitmap of CPUs that a path can run on. This isn't something that lends itself to the kind of auto-assembling that multipathd does. But even if we did want to try to support this path-selector, until we do, we shouldn't be listing it in the multipath.conf documentation.
Signed-off-by Benjamin Marzinski <bmarzins at redhat.com>--- multipath/multipath.conf.5 | 4 ---- 1 file changed, 4 deletions(-)multipath/multipath.conf.5 +0
-0
multipath/multipath.conf.5 of outstanding I/O to the path and its relative throughput. · line 210
Quoted 10 lines
multipath/multipath.conf.5 +0
-4@@ -205,10 +205,6 @@ of outstanding I/O to the path and its relative throughput. estimation of future service time based on the history of previous I/O submitted to each path. .TP -.I "io-affinity 0" -(Since 5.11 kernel) Choose the path for the next bunch of I/O based on a CPU to -path mapping the user passes in and what CPU we are executing on. -.TP The default is: \fBservice-time 0\fR .RE .
I think the main, and only?, consumer for this path selector is Exadata.
--
dm-devel mailing list
[email protected]
https://listman.redhat.com/mailman/listinfo/dm-devel
Quoted 25 lines · Xose Vazquez Perez
Quoted 23 lines · bmarzins at redhat.com (Benjamin Marzinski)
The multpath-tools do not support the io-affinity path selector. We always add a repeat count as the path argument. The io-affinity selector doesn't take one. Instead it takes a bitmap of CPUs that a path can run on. This isn't something that lends itself to the kind of auto-assembling that multipathd does. But even if we did want to try to support this path-selector, until we do, we shouldn't be listing it in the multipath.conf documentation.
Signed-off-by Benjamin Marzinski <bmarzins at redhat.com>---
multipath/multipath.conf.5 | 4 ----1 file changed, 4 deletions(-)multipath/multipath.conf.5 +0
-0@@ -205,10 +205,6 @@ of outstanding I/O to the path and its relative throughput.estimation of future service time based on the history of previous I/O submitted to each path.
.TP
-.I "io-affinity 0"
Quoted 8 lines
Quoted 6 lines
multipath/multipath.conf.5 +0
-3-(Since 5.11 kernel) Choose the path for the next bunch of I/O based on a CPU to -path mapping the user passes in and what CPU we are executing on. -.TPThe default is: \fBservice-time 0\fR
.RE
.I think the main, and only?, consumer for this path selector is Exadata.
Not exadata but another user in oracle.
The patch is ok with me. We've been setting it up manually. When I get time to do multipathd support I'll update the docs as well.
--
dm-devel mailing list
[email protected]
https://listman.redhat.com/mailman/listinfo/dm-devel