Re: [dm-devel] [PATCH V3 0/5] dm-rq: improve sequential I/O performance

2018-01-13 Thread Ming Lei
On Fri, Jan 12, 2018 at 05:31:17PM -0500, Mike Snitzer wrote: > On Fri, Jan 12 2018 at 1:54pm -0500, > Bart Van Assche wrote: > > > On Fri, 2018-01-12 at 13:06 -0500, Mike Snitzer wrote: > > > OK, you have the stage: please give me a pointer to your best > > >

Re: [dm-devel] [PATCH V3 0/5] dm-rq: improve sequential I/O performance

2018-01-13 Thread Mike Snitzer
On Fri, Jan 12 2018 at 8:37pm -0500, Mike Snitzer wrote: > On Fri, Jan 12 2018 at 8:00pm -0500, > Bart Van Assche wrote: > > > On Fri, 2018-01-12 at 19:52 -0500, Mike Snitzer wrote: > > > It was 50 ms before it was 100 ms. No real explaination for

Re: [dm-devel] [PATCH V3 0/5] dm-rq: improve sequential I/O performance

2018-01-13 Thread Mike Snitzer
On Sat, Jan 13 2018 at 10:04am -0500, Ming Lei wrote: > On Fri, Jan 12, 2018 at 05:31:17PM -0500, Mike Snitzer wrote: > > > > Ming or Jens: might you be able to shed some light on how dm-mpath > > would/could set BLK_MQ_S_SCHED_RESTART? A new function added that can > >

Re: [dm-devel] [PATCH V3 0/5] dm-rq: improve sequential I/O performance

2018-01-13 Thread Ming Lei
On Fri, Jan 12, 2018 at 06:54:49PM +, Bart Van Assche wrote: > On Fri, 2018-01-12 at 13:06 -0500, Mike Snitzer wrote: > > OK, you have the stage: please give me a pointer to your best > > explaination of the several. > > Since the previous discussion about this topic occurred more than a

[dm-devel] [PATCH v2 20/20] libmultipath: path latency: remove warnings

2018-01-13 Thread Martin Wilck
The warnings at here are pointless. We are looking at a single path only. Firstly, the standdard deviation for this measurement can't be "too low" - the lower, the more precise the measurement, the better. Secondly, a high standard deviation indicates an unstable path with highly variable latency.

[dm-devel] [PATCH v2 09/20] libmultipath: hwtable: multibus for NetApp NVMe-FC

2018-01-13 Thread Martin Wilck
Use multibus policy for NetApp NVMe-FC namespace controllers. The search logic in find_hwe() looks for vendor/product matches backwards, and quits if a match is found. Therefore specific sub-entries of a generic entry have to be listed below the generic ones. Therefore, pull the generic NVME entry

[dm-devel] [PATCH v2 10/20] multipath -C: decrease log level

2018-01-13 Thread Martin Wilck
Avoid that the positive case ("usable paths found") spams the syslog on systems with many LUNs. --- multipath/main.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/multipath/main.c b/multipath/main.c index 25162a0e9a7c..52bf1658bbca 100644 --- a/multipath/main.c +++

[dm-devel] [PATCH v2 18/20] libmultipath: path latency: log threshold with p2

2018-01-13 Thread Martin Wilck
This is not a critical error. It just means that the path in question will have low priority (rightly so, if it has >100s latency). --- libmultipath/prioritizers/path_latency.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libmultipath/prioritizers/path_latency.c

[dm-devel] [PATCH v2 07/20] libmultipath: get_vpd_sgio: support VPD 0xc9

2018-01-13 Thread Martin Wilck
This VPD is needed to check for NetApp E-Series RDAC support. --- libmultipath/discovery.c | 6 +- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/libmultipath/discovery.c b/libmultipath/discovery.c index 43631c46f21e..8ae170ee3a27 100644 --- a/libmultipath/discovery.c +++

[dm-devel] [PATCH v2 16/20] multipathd.service: set TasksMax=infinity

2018-01-13 Thread Martin Wilck
Systemd 228 introduced a global task limit of 512 for system services. System 231 changed this to 15% of pid_max, or 4915. In particular the one of systemd 228 is too low for multipathd with many LUNs. Use TasksMax=infinity to overcome this limitation. --- multipathd/multipathd.service | 1 + 1

[dm-devel] [PATCH v2 15/20] test-kpartx: add test for mapping without UUID

2018-01-13 Thread Martin Wilck
kpartx shouldn't remove these mappings. --- kpartx/test-kpartx | 11 ++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/kpartx/test-kpartx b/kpartx/test-kpartx index 60b3eb231de2..09d15a9458ea 100755 --- a/kpartx/test-kpartx +++ b/kpartx/test-kpartx @@ -131,7 +131,7 @@ step

[dm-devel] [PATCH v2 14/20] multipathd: fix compiler warning for uev_pathfail_check

2018-01-13 Thread Martin Wilck
gcc7 spits out an indentation warning for this function. Fixes: 8392431 "multipath-tools: check null path before handle path-failed event" --- multipathd/main.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/multipathd/main.c b/multipathd/main.c index

[dm-devel] [PATCH v2 08/20] libmultipath: select ALUA prioritizer for RDAC arrays only

2018-01-13 Thread Martin Wilck
Since commit 7e2f46d3, multipathd with "detect_prio" setting (=default) chooses ALUA prioritizer rather than sysfs prioritizer for arrays with implicit TPGS. But the intention of that patch was to choose ALUA for NetApp E-Series (RDAC) storage arrays *only*, not for every array with implicit TPGS.

[dm-devel] [PATCH v2 19/20] libmultipath: path latency: simplify getprio()

2018-01-13 Thread Martin Wilck
The log standard deviation can be calculated much more simply by realizing sum_n (x_i - avg(x))^2 == sum_n x_i^2 - n * avg(x)^2 Also, use timespecsub rather than the custom timeval_to_usec, and avoid taking log(0). --- libmultipath/prioritizers/path_latency.c | 71

[dm-devel] [PATCH v2 13/20] multipathd.service: drop Before=lvm2-lvmetad.service

2018-01-13 Thread Martin Wilck
lvm2-lvmetad does not depend on multipathd. On the contrary, when multipathd sets up a map that contains LVM PVs, it's good if lvm2-lvmetad is already running. --- multipathd/multipathd.service | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/multipathd/multipathd.service

[dm-devel] [PATCH v2 11/20] kpartx.rules: fix by-id/scsi-* for user_friendly_names

2018-01-13 Thread Martin Wilck
With user_friendly names (or generally, with aliases), the udev rules create /dev/disk/by-id/scsi-${ALIAS} rather than /dev/disk/by-id/scsi-${ID_SERIAL}. Fix that. --- kpartx/dm-parts.rules | 4 ++-- kpartx/kpartx_id| 8 +++- multipath/11-dm-mpath.rules | 3 ++- 3 files

[dm-devel] [PATCH v2 06/20] libmultipath: sgio_get_vpd: add page argument

2018-01-13 Thread Martin Wilck
get_vpd_sgio() assumes to be able to send different VPD inquires. This requires passing the pg argument to sgio_get_vpd(). --- libmultipath/discovery.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/libmultipath/discovery.c b/libmultipath/discovery.c index

[dm-devel] [PATCH v2 12/20] multipathd.socket: add WantedBy=sockets.target

2018-01-13 Thread Martin Wilck
Without this, "systemctl enable multipathd.service" spits out an error message. --- multipathd/multipathd.socket | 3 +++ 1 file changed, 3 insertions(+) diff --git a/multipathd/multipathd.socket b/multipathd/multipathd.socket index 921706d5d333..0ed4a1f7958b 100644 ---

[dm-devel] [PATCH v2 17/20] libmultipath: path latency: fix default base num

2018-01-13 Thread Martin Wilck
I don't think anyone can measure latency to 1% accuracy. It's better to not even pretend to be able to. 10% should be fine even for the most latency-critical environments. --- libmultipath/prioritizers/path_latency.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git

[dm-devel] [PATCH v2 04/20] libmultipath: fix return code of sysfs_get_timeout

2018-01-13 Thread Martin Wilck
This function should return 1 on success, as the other sysfs_get_XXX functions. The callers actually expect this - therefore timeout values from sysfs are never used. --- libmultipath/discovery.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libmultipath/discovery.c

Re: [dm-devel] multipath-tools 0.7.4 failure to remove device

2018-01-13 Thread Martin Wilck
On Fri, 2018-01-12 at 22:47 +0100, Julian Andres Klode wrote: > On Fri, Jan 12, 2018 at 09:35:39PM +0100, Martin Wilck wrote: > > On Fri, 2018-01-12 at 09:38 +0100, Julian Andres Klode wrote: > > > > > > --- a/multipathd/main.c > > > +++ b/multipathd/main.c > > > @@ -1090,6 +1090,11 @@

[dm-devel] [PATCH v2 02/20] multipath: delegate dangerous commands to multipathd

2018-01-13 Thread Martin Wilck
Some multipath commands are dangerous to run while multipathd is running. For example, "multipath -r" may apply a modified configuration to the kernel, while multipathd is still using the old configuration, leading to inconsistent state between multipathd and the kernel. It is safer to use

[dm-devel] [PATCH v2 01/20] libmultipath: don't try to set hwhandler if it is retained

2018-01-13 Thread Martin Wilck
Setting a device handler only works if retain_attached_hw_handler is 'no', or if the kernel didn't auto-assign a handler. If this is not the case, don't even attempt to set a different handler. This requires reading the sysfs "dh_state" path attribute. --- libmultipath/configure.c | 8 +++-

[dm-devel] [PATCH v2 00/20] Various multipath-tools fixes

2018-01-13 Thread Martin Wilck
Hi Christophe, here is v2 of my last series, rebased onto your latest merges. Changes wrt v1: - dropped already merged CLOCK_MONOTONIC patch - added a compiler warning fix - improved placement of NetApp entry in hwtable (Xose Vazquez Perez, 09/20) - added two SUSE patches that were

[dm-devel] [PATCH v2 05/20] libmultipath: fix return code of sgio_get_vpd()

2018-01-13 Thread Martin Wilck
This function must return the length of data received in success case. --- libmultipath/discovery.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libmultipath/discovery.c b/libmultipath/discovery.c index ab7794d8d2e1..c53d3aab897f 100644 --- a/libmultipath/discovery.c +++

[dm-devel] [PATCH v2 03/20] libmultipath: condlog: log to stderr

2018-01-13 Thread Martin Wilck
Calling 'multipath' might result in various error messages, all of which should be directed to stderr. Having them intermixed with the actual output on stdout makes parsing really hard. Signed-off-by: Martin Wilck --- libmultipath/debug.c | 4 ++-- 1 file changed, 2

Re: [dm-devel] multipath-tools: release uxsocket and resource when cancel thread

2018-01-13 Thread Martin Wilck
On Wed, 2017-11-29 at 09:35 +, Wuchongyun wrote: > Hi , > > Issue description: > when multipathd initilaze and call uxsock_listen to create unix > domain socket, but return -1 and the errno is 98 > and then the uxsock_listen return null. After multipathd startup we > can't receive any

Re: [dm-devel] [PATCH 0/3] Three multipath-tools source code cleanup patches

2018-01-13 Thread Christophe Varoqui
Applied, Thanks. On Tue, Dec 12, 2017 at 1:45 AM, Bart Van Assche wrote: > Hello Christophe, > > The three patches in this series make it easier to compile the > multipath-tools > source code with sparse and address two issues discovered by sparse. Please > consider

Re: [dm-devel] [PATCH] multipath-tools: refresh kernel-doc from kernel sources

2018-01-13 Thread Christophe Varoqui
Applied. Thanks. On Fri, Nov 17, 2017 at 5:54 PM, Xose Vazquez Perez wrote: > Cc: Gris Ge > Cc: Christophe Varoqui > Cc: device-mapper development > Signed-off-by: Xose Vazquez Perez

Re: [dm-devel] [PATCH] multipath-tools: check null path before handle path-failed event

2018-01-13 Thread Christophe Varoqui
Merged. Thanks. On Mon, Dec 4, 2017 at 2:15 PM, Guan Junxiong wrote: > In the hot-plug storage OS, if we tear down the target storage, > there is a race between the path removing from the path list and > handling the path-failed udev event. Therefore, we need to check >

Re: [dm-devel] [for-4.16 PATCH v6 2/4] block: properly protect the 'queue' kobj in blk_unregister_queue

2018-01-13 Thread Ming Lei
On Fri, Jan 12, 2018 at 11:03:52AM -0500, Mike Snitzer wrote: > The original commit e9a823fb34a8b (block: fix warning when I/O elevator > is changed as request_queue is being removed) is pretty conflated. > "conflated" because the resource being protected by q->sysfs_lock isn't > the queue_flags

Re: [dm-devel] [PATCH v2] multipath-tools: add README.alua with instructions to enable ALUA

2018-01-13 Thread Christophe Varoqui
Applied, Thanks. On Tue, Nov 21, 2017 at 7:52 PM, Xose Vazquez Perez wrote: > ALUA is supported in some storage devices, but usually it's disabled by > default. > > Cc: NetApp RDAC team > Cc: Christophe Varoqui

Re: [dm-devel] [PATCH v2] multipath-tools: output more topology info for NVMe discovery

2018-01-13 Thread Christophe Varoqui
Merged. Thanks. On Mon, Dec 4, 2017 at 2:13 PM, Guan Junxiong wrote: > From: Jie Yang > > Assign sg_id.channel to controller id of the NVMe/NVMf target > and assign sg_id.lun to namespace ID of the target. > > Signed-off-by: Jie Yang

Re: [dm-devel] [PATCH 0/4] multipath-tools: libdmmp improvements.

2018-01-13 Thread Christophe Varoqui
Merged. Thanks. On Tue, Nov 21, 2017 at 3:09 PM, Gris Ge wrote: > * Patch 1/4 is a resend. > * Patch 2/4, 3/4, and 4/4 add new functions to libdmmp library. > > Gris Ge (4): > multipathd daemon: Fix incorrect use of CLOCK_MONOTONIC in pthread > multipath-tools: libdmmp:

Re: [dm-devel] [PATCH 2/2] libmultipath: don't update path queueing on reload

2018-01-13 Thread Christophe Varoqui
Applied. Thanks On Mon, Dec 18, 2017 at 2:49 PM, Martin Wilck wrote: > On Wed, 2017-12-13 at 12:08 -0600, Benjamin Marzinski wrote: > > With the fix to the features handling code, the multipath device > > should > > already be reloaded with the correct value for

Re: [dm-devel] [PATCH 00/12] Misc fixes

2018-01-13 Thread Christophe Varoqui
Applied. Thanks. On Thu, Dec 7, 2017 at 7:48 PM, Benjamin Marzinski wrote: > The first patch here is just a rebased version of an earlier patch. The > last > patch is fixes for commit 95d594fd6f031e59bb73d04a631b6c592fe26214 > "multipath-tools: intermittent IO error

Re: [dm-devel] [PATCH 10/14] libmultipath: hwtable: multibus for NetApp NVMe-FC

2018-01-13 Thread Martin Wilck
On Sat, 2018-01-13 at 00:42 +0100, Xose Vazquez Perez wrote: > On 01/12/2018 11:07 PM, Martin Wilck wrote: > > > Use multibus policy for NetApp NVMe-FC namespace controllers. > > > > Signed-off-by: Martin Wilck > > --- > > libmultipath/hwtable.c | 13 + > > 1 file