Re: [dm-devel] Question about merge performance

2017-03-23 Thread Michael McCarthy
I appreciate the insight. Are there any plans to enhance the code to allow more parallel execution and/or allow users to experiment with QD? Thanks, again. Mike On Thu, Mar 23, 2017 at 7:02 PM, Heinz Mauelshagen wrote: > > > On 03/23/2017 05:35 PM, Michael McCarthy wrote: >

[dm-devel] [PATCH v3] block: trace completion of all bios.

2017-03-23 Thread NeilBrown
Currently only dm and md/raid5 bios trigger trace_block_bio_complete(). Now that we have bio_chain() and bio_inc_remaining(), it is not possible, in general, for a driver to know when the bio is really complete. Only bio_endio() knows that. So move the trace_block_bio_complete() call to

Re: [dm-devel] [PATCH v2] block: trace completion of all bios.

2017-03-23 Thread NeilBrown
On Thu, Mar 23 2017, Ming Lei wrote: > On Thu, Mar 23, 2017 at 05:29:02PM +1100, NeilBrown wrote: >> >> /** >> + * bio_endio_notrace - end I/O on a bio without tracing >> + * @bio:bio >> + * >> + * Description: >> + * bio_endio_notrace() will end I/O on the whole bio. >> + *

Re: [dm-devel] Question about merge performance

2017-03-23 Thread Heinz Mauelshagen
On 03/23/2017 05:35 PM, Michael McCarthy wrote: Hello, collective wisdom, I'm new to the list and apologize if this is not the right place to ask this type of question and if so, would be glad receive pointers to the correct one. Now the question: I'm looking for ways to improve

Re: [dm-devel] RFC: always use REQ_OP_WRITE_ZEROES for zeroing offload

2017-03-23 Thread Lars Ellenberg
On Thu, Mar 23, 2017 at 01:02:22PM -0400, Mike Snitzer wrote: > On Thu, Mar 23 2017 at 11:54am -0400, > Lars Ellenberg wrote: > > > On Thu, Mar 23, 2017 at 10:33:18AM -0400, Christoph Hellwig wrote: > > > This series makes REQ_OP_WRITE_ZEROES the only zeroing offload >

Re: [dm-devel] multipath-tools (patch): Do not select sysfs prioritizer for RDAC arrays (was Re: [PATCH 00/33] multipath-tools fixes from SUSE)

2017-03-23 Thread Stewart, Sean
On 3/23/17, 1:43 PM, "dm-devel-boun...@redhat.com on behalf of Xose Vazquez Perez" wrote: On 03/01/2017 09:12 AM, Martin Wilck wrote: > On Tue, 2017-02-28 at 23:44 +0100, Xose Vazquez Perez wrote: >> >>

[dm-devel] multipath-tools (patch): Do not select sysfs prioritizer for RDAC arrays (was Re: [PATCH 00/33] multipath-tools fixes from SUSE)

2017-03-23 Thread Xose Vazquez Perez
On 03/01/2017 09:12 AM, Martin Wilck wrote: > On Tue, 2017-02-28 at 23:44 +0100, Xose Vazquez Perez wrote: >> >> There is a recent one missing: >> --- >> Subject: libmultipath/propsel: Do not select sysfs prioritizer for >> RDAC arrays > > Well observed :-) This one still needs verification. We

Re: [dm-devel] RFC: always use REQ_OP_WRITE_ZEROES for zeroing offload

2017-03-23 Thread Mike Snitzer
On Thu, Mar 23 2017 at 11:54am -0400, Lars Ellenberg wrote: > On Thu, Mar 23, 2017 at 10:33:18AM -0400, Christoph Hellwig wrote: > > This series makes REQ_OP_WRITE_ZEROES the only zeroing offload > > supported by the block layer, and switches existing implementations >

[dm-devel] Question about merge performance

2017-03-23 Thread Michael McCarthy
Hello, collective wisdom, I'm new to the list and apologize if this is not the right place to ask this type of question and if so, would be glad receive pointers to the correct one. Now the question: I'm looking for ways to improve snapshot-merge target performance. We're using CentOS 7.3 here.

Re: [dm-devel] [PATCH 06/23] dm-kcopyd: switch to use REQ_OP_WRITE_ZEROES

2017-03-23 Thread Mike Snitzer
On Thu, Mar 23 2017 at 10:56am -0400, Christoph Hellwig wrote: > On Thu, Mar 23, 2017 at 10:55:22AM -0400, Mike Snitzer wrote: > > See commit 70d6c400a ("dm kcopyd: add WRITE SAME support to dm_kcopyd_zero") > > drivers/md/dm-io.c:do_region() adjusts the WRITE SAME payload to be a >

[dm-devel] RFC: always use REQ_OP_WRITE_ZEROES for zeroing offload

2017-03-23 Thread Christoph Hellwig
This series makes REQ_OP_WRITE_ZEROES the only zeroing offload supported by the block layer, and switches existing implementations of REQ_OP_DISCARD that correctly set discard_zeroes_data to it, removes incorrect discard_zeroes_data, and also switches WRITE SAME based zeroing in SCSI to this new

[dm-devel] [PATCH 10/23] block: add a new BLKDEV_ZERO_NOFALLBACK flag

2017-03-23 Thread Christoph Hellwig
This avoids fallbacks to explicit zeroing in (__)blkdev_issue_zeroout if the caller doesn't want them. Also clean up the convoluted check for the return condition that this new flag is added to. Signed-off-by: Christoph Hellwig --- block/blk-lib.c| 5 -

[dm-devel] [PATCH 23/23] block: remove the discard_zeroes_data flag

2017-03-23 Thread Christoph Hellwig
Now that we use the proper REQ_OP_WRITE_ZEROES operation everywhere we can kill this hack. Signed-off-by: Christoph Hellwig --- Documentation/ABI/testing/sysfs-block | 10 ++ Documentation/block/queue-sysfs.txt | 5 - block/blk-lib.c | 7

[dm-devel] [PATCH 12/23] sd: handle REQ_UNMAP

2017-03-23 Thread Christoph Hellwig
Try to use a write same with unmap bit variant if the device supports it and the caller asks for it. Signed-off-by: Christoph Hellwig --- drivers/scsi/sd.c | 10 ++ 1 file changed, 10 insertions(+) diff --git a/drivers/scsi/sd.c b/drivers/scsi/sd.c index

[dm-devel] [PATCH 14/23] zram: implement REQ_OP_WRITE_ZEROES

2017-03-23 Thread Christoph Hellwig
Just the same as discard if the block size equals the system page size. Signed-off-by: Christoph Hellwig --- drivers/block/zram/zram_drv.c | 13 - 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/drivers/block/zram/zram_drv.c b/drivers/block/zram/zram_drv.c

[dm-devel] [PATCH 11/23] block_dev: use blkdev_issue_zerout for hole punches

2017-03-23 Thread Christoph Hellwig
This gets us support for non-discard efficient write of zeroes (e.g. NVMe) and preparse for removing the discard_zeroes_data flag. Also remove a pointless discard support check, which is done in blkdev_issue_discard already. Signed-off-by: Christoph Hellwig --- fs/block_dev.c | 16

[dm-devel] [PATCH 09/23] block: add a REQ_UNMAP flag for REQ_OP_WRITE_ZEROES

2017-03-23 Thread Christoph Hellwig
If this flag is set logical provisioning capable device should release space for the zeroed blocks if possible, if it is not set devices should keep the blocks anchored. Also remove an out of sync kerneldoc comment for a static function that would have become even more out of data with this

[dm-devel] [PATCH 17/23] rbd: remove the discard_zeroes_data flag

2017-03-23 Thread Christoph Hellwig
rbd only supports discarding on large alignments, so the zeroing code would always fall back to explicit writings of zeroes. Signed-off-by: Christoph Hellwig --- drivers/block/rbd.c | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/block/rbd.c b/drivers/block/rbd.c index

[dm-devel] [PATCH 16/23] brd: remove discard support

2017-03-23 Thread Christoph Hellwig
It's just a in-driver reimplementation of writing zeroes to the pages, which fails if the discards aren't page aligned. Signed-off-by: Christoph Hellwig --- drivers/block/brd.c | 56 - 1 file changed, 56 deletions(-) diff --git

[dm-devel] [PATCH 15/23] loop: implement REQ_OP_WRITE_ZEROES

2017-03-23 Thread Christoph Hellwig
It's identical to discard as hole punches will always leave us with zeroes on reads. Signed-off-by: Christoph Hellwig --- drivers/block/loop.c | 4 1 file changed, 4 insertions(+) diff --git a/drivers/block/loop.c b/drivers/block/loop.c index 0ecb6461ed81..265cd2e33ff0 100644

[dm-devel] [PATCH 22/23] drbd: implement REQ_OP_WRITE_ZEROES

2017-03-23 Thread Christoph Hellwig
It seems like DRBD assumes its on the wire TRIM request always zeroes data. Use that fact to implement REQ_OP_WRITE_ZEROES. XXX: will need a careful audit from the drbd team! Signed-off-by: Christoph Hellwig --- drivers/block/drbd/drbd_main.c | 3 ++-

[dm-devel] [PATCH 06/23] dm-kcopyd: switch to use REQ_OP_WRITE_ZEROES

2017-03-23 Thread Christoph Hellwig
It seems like the code currently passes whatever it was using for writes to WRITE SAME. Just switch it to WRITE ZEROES, although that doesn't need any payload. Untested, and confused by the code, maybe someone who understands it better than me can help.. Not-yet-signed-off-by: Christoph Hellwig

Re: [dm-devel] [PATCH 06/23] dm-kcopyd: switch to use REQ_OP_WRITE_ZEROES

2017-03-23 Thread Christoph Hellwig
On Thu, Mar 23, 2017 at 10:55:22AM -0400, Mike Snitzer wrote: > See commit 70d6c400a ("dm kcopyd: add WRITE SAME support to dm_kcopyd_zero") > drivers/md/dm-io.c:do_region() adjusts the WRITE SAME payload to be a > single page. > > So you'd want to tweak dm-io.c accordingly for WRITE ZEROES

[dm-devel] [PATCH 13/23] nvme: implement REQ_OP_WRITE_ZEROES

2017-03-23 Thread Christoph Hellwig
But now for the real NVMe Write Zeroes yet, just to get rid of the discard abuse for zeroing. Also rename the quirk flag to be a bit more self-explanatory. Signed-off-by: Christoph Hellwig --- drivers/nvme/host/core.c | 10 +- drivers/nvme/host/nvme.h | 6 +++---

[dm-devel] [PATCH 20/23] block: stop using discards for zeroing

2017-03-23 Thread Christoph Hellwig
Now that we have REQ_OP_WRITE_ZEROES implemented for all devices that support efficient zeroing of devices we can remove the call to blkdev_issue_discard. This means we only have two ways of zeroing left and can simply the code. Signed-off-by: Christoph Hellwig --- block/blk-lib.c

[dm-devel] [PATCH 05/23] dm: support REQ_OP_WRITE_ZEROES

2017-03-23 Thread Christoph Hellwig
Copy & paste from the REQ_OP_WRITE_SAME code. Signed-off-by: Christoph Hellwig --- drivers/md/dm-core.h | 1 + drivers/md/dm-io.c| 10 +++--- drivers/md/dm-linear.c| 1 + drivers/md/dm-mpath.c | 1 + drivers/md/dm-rq.c| 11

[dm-devel] [PATCH 19/23] mmc: remove the discard_zeroes_data flag

2017-03-23 Thread Christoph Hellwig
mmc only supports discarding on large alignments, so the zeroing code would always fall back to explicit writings of zeroes. Signed-off-by: Christoph Hellwig --- drivers/mmc/core/queue.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/drivers/mmc/core/queue.c

Re: [dm-devel] [PATCH 06/23] dm-kcopyd: switch to use REQ_OP_WRITE_ZEROES

2017-03-23 Thread Mike Snitzer
On Thu, Mar 23 2017 at 10:33am -0400, Christoph Hellwig wrote: > It seems like the code currently passes whatever it was using for writes > to WRITE SAME. Just switch it to WRITE ZEROES, although that doesn't > need any payload. > > Untested, and confused by the code, maybe

[dm-devel] [PATCH 18/23] rsxx: remove the discard_zeroes_data flag

2017-03-23 Thread Christoph Hellwig
rsxx only supports discarding on large alignments, so the zeroing code would always fall back to explicit writings of zeroes. Signed-off-by: Christoph Hellwig --- drivers/block/rsxx/dev.c | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/block/rsxx/dev.c

[dm-devel] [PATCH 07/23] block: stop using blkdev_issue_write_same for zeroing

2017-03-23 Thread Christoph Hellwig
We'll always use the WRITE ZEROES code for zeroing now. Signed-off-by: Christoph Hellwig --- block/blk-lib.c | 4 1 file changed, 4 deletions(-) diff --git a/block/blk-lib.c b/block/blk-lib.c index ed1e78e24db0..a93115ccf461 100644 --- a/block/blk-lib.c +++ b/block/blk-lib.c

[dm-devel] [PATCH 03/23] sd: implement REQ_OP_WRITE_ZEROES

2017-03-23 Thread Christoph Hellwig
Signed-off-by: Christoph Hellwig --- drivers/scsi/sd.c | 45 - drivers/scsi/sd_zbc.c | 1 + 2 files changed, 41 insertions(+), 5 deletions(-) diff --git a/drivers/scsi/sd.c b/drivers/scsi/sd.c index af632e350ab4..b6f70a09a301 100644

Re: [dm-devel] [PATCH] multipath-tools: arrange compilation options for binaries

2017-03-23 Thread Xose Vazquez Perez
On 03/23/2017 10:09 AM, Christophe Varoqui wrote: > And reverted: > hh > From http://eli.thegreenplace.net/2013/07/09/library-order-in-static-linking: > > If object or library AA needs a symbol from library BB, then AA should > come /before/ library BB in the command-line invocation of

[dm-devel] [multipath-tools] [BUG] segfault in uev_update_path

2017-03-23 Thread Shichangkuo
Hi, all I used multipath-toosl 0.6.4 for some testing. When executing udevadm trigger command, I find something wrong with multipathd. Logs are as follows: Mar 15 19:26:00 server155 multipathd: sdj: path wwid changed from '360002ac000e700013071' to

Re: [dm-devel] [PATCH] multipath-tools: arrange compilation options for binaries

2017-03-23 Thread Christophe Varoqui
And reverted: >From http://eli.thegreenplace.net/2013/07/09/library-order-in-static-linking : If object or library AA needs a symbol from library BB, then AA should come *before* library BB in the command-line invocation of the linker. On Thu, Mar 23, 2017 at 9:34 AM, Christophe Varoqui <

Re: [dm-devel] [PATCH] multipath-tools: arrange compilation options for shared libs/objects

2017-03-23 Thread Christophe Varoqui
Merged, Thanks. On Sat, Mar 18, 2017 at 6:45 PM, Xose Vazquez Perez wrote: > Cc: Christophe Varoqui > Cc: device-mapper development > Signed-off-by: Xose Vazquez Perez > --- >

Re: [dm-devel] [PATCH] multipath-tools: arrange compilation options for binaries

2017-03-23 Thread Christophe Varoqui
Merged, Thanks. On Fri, Mar 17, 2017 at 11:40 PM, Xose Vazquez Perez wrote: > Cc: Christophe Varoqui > Cc: device-mapper development > Signed-off-by: Xose Vazquez Perez > --- >

Re: [dm-devel] [PATCH] multipath-tools: build objects for libdmmp and libmpathpersist independently

2017-03-23 Thread Christophe Varoqui
Merged, Thanks. On Fri, Mar 17, 2017 at 4:21 PM, Xose Vazquez Perez wrote: > libdmmp: > cc -c -O2 -g -pipe -Wall -Wextra -Wformat=2 -Werror=implicit-int > -Werror=implicit-function-declaration -Werror=format-security > -Wno-sign-compare -Wno-unused-parameter

Re: [dm-devel] [PATCH] multipath-tools: add missing "-l" flag for pthread in libdmmp/Makefile

2017-03-23 Thread Christophe Varoqui
Applied. Thanks On Fri, Mar 17, 2017 at 3:15 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: Remove trailing whitespaces

2017-03-23 Thread Christophe Varoqui
Merged. Thanks. On Fri, Mar 17, 2017 at 1:35 AM, Xose Vazquez Perez wrote: > Cc: Christophe Varoqui > Cc: device-mapper development > Signed-off-by: Xose Vazquez Perez > --- >

Re: [dm-devel] [PATCH 00/33] multipath-tools fixes from SUSE

2017-03-23 Thread Christophe Varoqui
The full set is now merged. Thanks. On Wed, Mar 22, 2017 at 10:29 PM, Christophe Varoqui < christophe.varo...@opensvc.com> wrote: > Pending. > I plan to merge the rest tomorrow. > > Le 22 mars 2017 8:02 PM, "Xose Vazquez Perez" a > écrit : > >> On 02/28/2017 05:22 PM,

[dm-devel] [PATCH v2] block: trace completion of all bios.

2017-03-23 Thread NeilBrown
Currently only dm and md/raid5 bios trigger trace_block_bio_complete(). Now that we have bio_chain(), it is not possible, in general, for a driver to know when the bio is really complete. Only bio_endio() knows that. So move the trace_block_bio_complete() call to bio_endio(). Now

Re: [dm-devel] [PATCH] block: trace completion of all bios.

2017-03-23 Thread NeilBrown
On Wed, Mar 22 2017, Christoph Hellwig wrote: > On Wed, Mar 22, 2017 at 01:38:09PM +1100, NeilBrown wrote: >> >> Currently only dm and md/raid5 bios trigger trace_block_bio_complete(). >> Now that we have bio_chain(), it is not possible, in general, for a >> driver to know when the bio is really