Re: [PATCH] SCSI: don't get target/host busy_count in scsi_mq_get_budget()

2017-11-06 Thread Bart Van Assche
On Sat, 2017-11-04 at 09:55 +0800, Ming Lei wrote: > It is very expensive to atomic_inc/atomic_dec the host wide counter of > host->busy_count, and it should have been avoided via blk-mq's mechanism > of getting driver tag, which uses the more efficient way of sbitmap queue. Did you perhaps mean

Re: [PATCH 4/5] nvme: implement multipath access to nvme subsystems

2017-11-06 Thread Mike Snitzer
On Thu, Nov 02 2017 at 2:30pm -0400, Christoph Hellwig wrote: > This patch adds native multipath support to the nvme driver. For each > namespace we create only single block device node, which can be used > to access that namespace through any of the controllers that refer to it.

[PATCH] block: avoid null pointer dereference on null disk

2017-11-06 Thread Colin King
From: Colin Ian King It is possible that the pointer disk can be null and hence we can get a null pointer deference when accessing disk->flags. Add a null pointer check to avoid the dereference. Detected by CoverityScan, CID#1461133 ("Explicit null dereferenced")

Re: high overhead of functions blkg_*stats_* in bfq

2017-11-06 Thread Paolo Valente
> Il giorno 06 nov 2017, alle ore 17:39, Jens Axboe ha > scritto: > > On 11/06/2017 09:37 AM, Tejun Heo wrote: >> On Mon, Nov 06, 2017 at 05:33:45PM +0100, Paolo Valente wrote: >>> Il giorno 06 nov 2017, alle ore 17:30, Tejun Heo ha scritto:

Re: high overhead of functions blkg_*stats_* in bfq

2017-11-06 Thread Paolo Valente
> Il giorno 06 nov 2017, alle ore 03:21, Jens Axboe ha > scritto: > > On 11/05/2017 01:39 AM, Paolo Valente wrote: >> >>> Il giorno 18 ott 2017, alle ore 15:19, Tejun Heo ha >>> scritto: >>> >>> Hello, Paolo. >>> >>> On Tue, Oct 17, 2017 at 12:11:01PM

Re: [PATCH 1/3] nvme: do not check for ns on rw path

2017-11-06 Thread Christoph Hellwig
On Sat, Nov 04, 2017 at 09:38:45AM -0600, Keith Busch wrote: > That's not quite right. For non-PI metadata formats, we use the > 'nop_profile', which gets the metadata buffer allocated so we can safely > use a metadata formatted namespace. There's no in-kernel user of the > allocated payload, but

Re: [PATCH V13 02/10] mmc: block: Add error-handling comments

2017-11-06 Thread Linus Walleij
On Fri, Nov 3, 2017 at 2:20 PM, Adrian Hunter wrote: > Add error-handling comments to explain what would also be done for blk-mq > if it used the legacy error-handling. > > Signed-off-by: Adrian Hunter Reviewed-by: Linus Walleij

Re: [PATCH V13 01/10] mmc: core: Add parameter use_blk_mq

2017-11-06 Thread Linus Walleij
On Fri, Nov 3, 2017 at 2:20 PM, Adrian Hunter wrote: > Until mmc has blk-mq support fully implemented and tested, add a > parameter use_blk_mq, default to false unless config option MMC_MQ_DEFAULT > is selected. > > Signed-off-by: Adrian Hunter

Re: high overhead of functions blkg_*stats_* in bfq

2017-11-06 Thread Ulf Hansson
On 6 November 2017 at 03:21, Jens Axboe wrote: > On 11/05/2017 01:39 AM, Paolo Valente wrote: >> >>> Il giorno 18 ott 2017, alle ore 15:19, Tejun Heo ha >>> scritto: >>> >>> Hello, Paolo. >>> >>> On Tue, Oct 17, 2017 at 12:11:01PM +0200, Paolo Valente wrote:

Re: [PATCH] SCSI: don't get target/host busy_count in scsi_mq_get_budget()

2017-11-06 Thread Bart Van Assche
On Sat, 2017-11-04 at 08:19 -0600, Jens Axboe wrote: > On 11/03/2017 07:55 PM, Ming Lei wrote: > > It is very expensive to atomic_inc/atomic_dec the host wide counter of > > host->busy_count, and it should have been avoided via blk-mq's mechanism > > of getting driver tag, which uses the more

[PATCH 1/2][RESEND] nbd: wait uninterruptible for the dead timeout

2017-11-06 Thread Josef Bacik
From: Josef Bacik If we have a pending signal or the user kills their application then it'll bring down the whole device, which is less than awesome. Instead wait uninterruptible for the dead timeout so we're sure we gave it our best shot. Fixes: 560bc4b39952 ("nbd: handle dead

[PATCH 2/2][RESEND] nbd: don't start req until after the dead connection logic

2017-11-06 Thread Josef Bacik
From: Josef Bacik We can end up sleeping for a while waiting for the dead timeout, which means we could get the per request timer to fire. We did handle this case, but if the dead timeout happened right after we submitted we'd either tear down the connection or possibly requeue

Re: [PATCH 1/2][RESEND] nbd: wait uninterruptible for the dead timeout

2017-11-06 Thread Jens Axboe
On 11/06/2017 02:11 PM, Josef Bacik wrote: > From: Josef Bacik > > If we have a pending signal or the user kills their application then > it'll bring down the whole device, which is less than awesome. Instead > wait uninterruptible for the dead timeout so we're sure we gave it

[PATCH] blk-mq: quiesce queue during switching io sched and updating nr_requests

2017-11-06 Thread Ming Lei
Dispatch may still be in-progress after queue is frozen, so we have to quiesce queue before switching IO scheduler and updating nr_requests. This reverts commit 7a148c2fcff8330(block: don't call blk_mq_quiesce_queue() after queue is frozen) basically. Fixes: 7a148c2fcff83309(block: don't call

Re: high overhead of functions blkg_*stats_* in bfq

2017-11-06 Thread Ulf Hansson
On 6 November 2017 at 10:49, Paolo Valente wrote: > >> Il giorno 06 nov 2017, alle ore 10:22, Ulf Hansson >> ha scritto: >> >> On 6 November 2017 at 03:21, Jens Axboe wrote: >>> On 11/05/2017 01:39 AM, Paolo Valente wrote:

[PATCH] lightnvm: pblk: remove some unnecessary NULL checks

2017-11-06 Thread Dan Carpenter
Smatch complains that flush_workqueue() dereferences the work queue pointer but then we check if it's NULL on the next line when it's too late. These NULL checks can be removed because the module won't load if we can't allocate the work queues. Signed-off-by: Dan Carpenter

Re: [PATCH v2] blktrace: cleanup/fix registration locking

2017-11-06 Thread Ming Lei
On Mon, Nov 6, 2017 at 12:21 AM, Jens Axboe wrote: > One patch that fixes up a discrepancy in how we lock the queue for > blktrace registration, and one that fixes up how we globally > serialize registering the tracepoints. > Reviewed-by: Ming Lei --

[Patch 1/1] partitions/msdos: Unable to mount UFS 44bsd partitions

2017-11-06 Thread Richard Narron
UFS partitions from newer versions of FreeBSD 10 and 11 use relative addressing for their subpartitions. But older versions of FreeBSD still use absolute addressing just like OpenBSD and NetBSD. Instead of simply testing for a FreeBSD partition, the code needs to also test if the starting

Re: [PATCH] blk-mq: respect queue dead via blk_mq_quiesce_queue

2017-11-06 Thread Ming Lei
On Mon, Nov 06, 2017 at 04:34:21PM +, Bart Van Assche wrote: > On Mon, 2017-11-06 at 11:44 +0800, Ming Lei wrote: > > On Sun, Nov 05, 2017 at 03:38:49PM +, Bart Van Assche wrote: > > > On Sun, 2017-11-05 at 20:10 +0800, Ming Lei wrote: > > > > diff --git a/block/blk-core.c

Re: [PATCH] SCSI: don't get target/host busy_count in scsi_mq_get_budget()

2017-11-06 Thread Ming Lei
On Mon, Nov 06, 2017 at 06:04:42PM +, Bart Van Assche wrote: > On Sat, 2017-11-04 at 09:55 +0800, Ming Lei wrote: > > It is very expensive to atomic_inc/atomic_dec the host wide counter of > > host->busy_count, and it should have been avoided via blk-mq's mechanism > > of getting driver tag,

Re: [PATCH v3 6/8] scsi/ipr: Use sgl_alloc_order() and sgl_free_order()

2017-11-06 Thread Martin K. Petersen
Bart, > Use the sgl_alloc_order() and sgl_free_order() functions instead of > open coding these functions. I'll merge patches 6-8 once the plumbing goes in. -- Martin K. Petersen Oracle Linux Engineering

Re: [PATCH] SCSI: don't get target/host busy_count in scsi_mq_get_budget()

2017-11-06 Thread Martin K. Petersen
Ming, >> Since this is a SCSI patch the SCSI maintainer, Martin Petersen, >> should have been Cc-ed for this patch. Additionally, I think that >> this patch should not have been queued by Jens before Martin had >> approved this patch. > > This patch has been CCed to SCSI list. I don't need a

Re: [PATCH] SCSI: don't get target/host busy_count in scsi_mq_get_budget()

2017-11-06 Thread Ming Lei
On Mon, Nov 06, 2017 at 07:45:23PM +, Bart Van Assche wrote: > On Sat, 2017-11-04 at 08:19 -0600, Jens Axboe wrote: > > On 11/03/2017 07:55 PM, Ming Lei wrote: > > > It is very expensive to atomic_inc/atomic_dec the host wide counter of > > > host->busy_count, and it should have been avoided

Re: [PATCH] blk-mq: Revert multiple recent patches

2017-11-06 Thread Ming Lei
On Mon, Nov 06, 2017 at 05:07:31PM -0800, Bart Van Assche wrote: > Since we are close to the merge window and since it is too late for > reworking patches and algorithms that have turned out to be flawed, > revert multiple recent patches. Revert patch "blk-mq: don't handle > TAG_SHARED in restart"

[PATCH] blk-mq: Revert multiple recent patches

2017-11-06 Thread Bart Van Assche
Since we are close to the merge window and since it is too late for reworking patches and algorithms that have turned out to be flawed, revert multiple recent patches. Revert patch "blk-mq: don't handle TAG_SHARED in restart" and all patches that conflict with the revert of that patch because that

Re: high overhead of functions blkg_*stats_* in bfq

2017-11-06 Thread Tejun Heo
Hello, On Sun, Nov 05, 2017 at 07:21:01PM -0700, Jens Axboe wrote: > It's pointless to give up on this so soon, when no effort has apparently > been dedicated to figuring out what the actual issue is yet. So no, no > patch that will just disable the stats is going to be accepted. > > That said,

Re: high overhead of functions blkg_*stats_* in bfq

2017-11-06 Thread Paolo Valente
> Il giorno 06 nov 2017, alle ore 11:48, Ulf Hansson > ha scritto: > > On 6 November 2017 at 10:49, Paolo Valente wrote: >> >>> Il giorno 06 nov 2017, alle ore 10:22, Ulf Hansson >>> ha scritto: >>> >>> On 6

Re: high overhead of functions blkg_*stats_* in bfq

2017-11-06 Thread Paolo Valente
> Il giorno 06 nov 2017, alle ore 16:00, Tejun Heo ha scritto: > > Hello, > > On Sun, Nov 05, 2017 at 07:21:01PM -0700, Jens Axboe wrote: >> It's pointless to give up on this so soon, when no effort has apparently >> been dedicated to figuring out what the actual issue is yet.

Re: high overhead of functions blkg_*stats_* in bfq

2017-11-06 Thread Jens Axboe
On 11/06/2017 09:11 AM, Paolo Valente wrote: > >> Il giorno 06 nov 2017, alle ore 16:47, Paolo Valente >> ha scritto: >> >>> >>> Il giorno 06 nov 2017, alle ore 16:00, Tejun Heo ha >>> scritto: >>> >>> Hello, >>> >>> On Sun, Nov 05, 2017 at

Re: high overhead of functions blkg_*stats_* in bfq

2017-11-06 Thread Jens Axboe
On 11/06/2017 08:00 AM, Tejun Heo wrote: > Hello, > > On Sun, Nov 05, 2017 at 07:21:01PM -0700, Jens Axboe wrote: >> It's pointless to give up on this so soon, when no effort has apparently >> been dedicated to figuring out what the actual issue is yet. So no, no >> patch that will just disable

Re: high overhead of functions blkg_*stats_* in bfq

2017-11-06 Thread Paolo Valente
> Il giorno 06 nov 2017, alle ore 16:47, Paolo Valente > ha scritto: > >> >> Il giorno 06 nov 2017, alle ore 16:00, Tejun Heo ha >> scritto: >> >> Hello, >> >> On Sun, Nov 05, 2017 at 07:21:01PM -0700, Jens Axboe wrote: >>> It's pointless to give

Re: high overhead of functions blkg_*stats_* in bfq

2017-11-06 Thread Paolo Valente
> Il giorno 06 nov 2017, alle ore 17:03, Jens Axboe ha > scritto: > > On 11/06/2017 08:00 AM, Tejun Heo wrote: >> Hello, >> >> On Sun, Nov 05, 2017 at 07:21:01PM -0700, Jens Axboe wrote: >>> It's pointless to give up on this so soon, when no effort has apparently >>> been

Re: high overhead of functions blkg_*stats_* in bfq

2017-11-06 Thread Paolo Valente
> Il giorno 06 nov 2017, alle ore 17:13, Jens Axboe ha > scritto: > > On 11/06/2017 09:11 AM, Paolo Valente wrote: >> >>> Il giorno 06 nov 2017, alle ore 16:47, Paolo Valente >>> ha scritto: >>> Il giorno 06 nov 2017, alle ore 16:00,

Re: high overhead of functions blkg_*stats_* in bfq

2017-11-06 Thread Jens Axboe
On 11/06/2017 09:21 AM, Paolo Valente wrote: > >> Il giorno 06 nov 2017, alle ore 17:13, Jens Axboe ha >> scritto: >> >> On 11/06/2017 09:11 AM, Paolo Valente wrote: >>> Il giorno 06 nov 2017, alle ore 16:47, Paolo Valente ha scritto:

Re: high overhead of functions blkg_*stats_* in bfq

2017-11-06 Thread Paolo Valente
> Il giorno 06 nov 2017, alle ore 17:22, Jens Axboe ha > scritto: > > On 11/06/2017 09:21 AM, Paolo Valente wrote: >> >>> Il giorno 06 nov 2017, alle ore 17:13, Jens Axboe ha >>> scritto: >>> >>> On 11/06/2017 09:11 AM, Paolo Valente wrote: > Il

Re: [PATCH 1/3] nvme: do not check for ns on rw path

2017-11-06 Thread Keith Busch
On Mon, Nov 06, 2017 at 10:13:24AM +0100, Christoph Hellwig wrote: > On Sat, Nov 04, 2017 at 09:38:45AM -0600, Keith Busch wrote: > > That's not quite right. For non-PI metadata formats, we use the > > 'nop_profile', which gets the metadata buffer allocated so we can safely > > use a metadata

Re: [PATCH 1/6] nvme: move the dying queue check from cancel to completion

2017-11-06 Thread Keith Busch
Looks good. Reviewed-by: Keith Busch

Re: [PATCH 2/6] nvme: always unregister the integrity profile in __nvme_revalidate_disk

2017-11-06 Thread Keith Busch
Looks good. Reviewed-by: Keith Busch

Re: [PATCH 3/6] nvme: don't pass struct nvme_ns to nvme_init_integrity

2017-11-06 Thread Keith Busch
Looks good. Reviewed-by: Keith Busch

Re: [PATCH 4/6] nvme: don't pass struct nvme_ns to nvme_config_discard

2017-11-06 Thread Keith Busch
Looks good. Reviewd-by: Keith Busch

Re: [PATCH 6/6] nvme: split __nvme_revalidate_disk

2017-11-06 Thread Keith Busch
Looks good. Reviewed-by: Keith Busch

Re: high overhead of functions blkg_*stats_* in bfq

2017-11-06 Thread Tejun Heo
Hello, On Mon, Nov 06, 2017 at 05:26:38PM +0100, Paolo Valente wrote: > Yes. DEBUG_BLK_CGROUP will just serve to keep the for-debugging > subset switched off even when the dynamic parameter is on. > > We'll wait for possible counter-arguments from Tejun, and then start > to work on what you

Re: [PATCH] blk-mq: respect queue dead via blk_mq_quiesce_queue

2017-11-06 Thread Bart Van Assche
On Mon, 2017-11-06 at 11:44 +0800, Ming Lei wrote: > On Sun, Nov 05, 2017 at 03:38:49PM +, Bart Van Assche wrote: > > On Sun, 2017-11-05 at 20:10 +0800, Ming Lei wrote: > > > diff --git a/block/blk-core.c b/block/blk-core.c > > > index 048be4aa6024..0b121f29e3b1 100644 > > > ---

Re: high overhead of functions blkg_*stats_* in bfq

2017-11-06 Thread Paolo Valente
> Il giorno 06 nov 2017, alle ore 17:30, Tejun Heo ha scritto: > > Hello, > > On Mon, Nov 06, 2017 at 05:26:38PM +0100, Paolo Valente wrote: >> Yes. DEBUG_BLK_CGROUP will just serve to keep the for-debugging >> subset switched off even when the dynamic parameter is on. >> >>

Re: high overhead of functions blkg_*stats_* in bfq

2017-11-06 Thread Tejun Heo
On Mon, Nov 06, 2017 at 05:33:45PM +0100, Paolo Valente wrote: > > > Il giorno 06 nov 2017, alle ore 17:30, Tejun Heo ha > > scritto: > > > > Hello, > > > > On Mon, Nov 06, 2017 at 05:26:38PM +0100, Paolo Valente wrote: > >> Yes. DEBUG_BLK_CGROUP will just serve to keep the

Re: high overhead of functions blkg_*stats_* in bfq

2017-11-06 Thread Jens Axboe
On 11/06/2017 09:37 AM, Tejun Heo wrote: > On Mon, Nov 06, 2017 at 05:33:45PM +0100, Paolo Valente wrote: >> >>> Il giorno 06 nov 2017, alle ore 17:30, Tejun Heo ha >>> scritto: >>> >>> Hello, >>> >>> On Mon, Nov 06, 2017 at 05:26:38PM +0100, Paolo Valente wrote: Yes.

Re: [PATCH] blk-mq: quiesce queue during switching io sched and updating nr_requests

2017-11-06 Thread Bart Van Assche
On Mon, 2017-11-06 at 18:43 +0800, Ming Lei wrote: > @@ -2665,6 +2665,7 @@ int blk_mq_update_nr_requests(struct request_queue *q, > unsigned int nr) > return -EINVAL; > > blk_mq_freeze_queue(q); > + blk_mq_quiesce_queue(q); > > ret = 0; >