Re: [PATCH 8/8] xen-blockfront: quiesce IO before device removal

2017-07-05 Thread Sagi Grimberg
Looks the above change isn't needed since this blk_mq_start_stopped_hw_queues() should have been the counterpart of blk_mq_stop_hw_queue() in blkif_queue_rq(). Removed the patch altogether in v2 as I'm not convinced it is needed. I've only started reading the series, but to me it seems like

Re: [PATCH 06/19] bcache: explicitly destory mutex while exiting

2017-07-05 Thread Liang Chen
mutex_destroy does nothing normally (may not be true in the future), but when debug mutex is turned on it helps with debugging - mutex_destroy in mutex-debug.c. It's not about freeing of the memory. It's more about consistency of the use of mutex and making the code future proof. Thanks, Linag On

Re: [PATCH v2] block: Fix __blkdev_issue_zeroout loop

2017-07-05 Thread Damien Le Moal
On 7/6/17 02:26, Christoph Hellwig wrote: > On Tue, Jul 04, 2017 at 05:27:02PM +0900, Damien Le Moal wrote: >> The BIO issuing loop in __blkdev_issue_zeroout() is allocating BIOs >> with a maximum number of bvec (pages) equal to >> >> min(nr_sects, (sector_t)BIO_MAX_PAGES) >> >> This works since

Re: [PATCH v3 5/8] nvme: kick requeue list when requeueing a request instead of when starting the queues

2017-07-05 Thread Ming Lei
On Thu, Jul 06, 2017 at 01:06:21AM +0200, Christoph Hellwig wrote: > I wonder if we should simply always kick the list and remove the > parameter and blk_mq_kick_requeue_list. It seems like this split > has caused a lot more harm then good, and the other drivers using > it that way are probably ha

Re: [PATCH v3 5/8] nvme: kick requeue list when requeueing a request instead of when starting the queues

2017-07-05 Thread Christoph Hellwig
I wonder if we should simply always kick the list and remove the parameter and blk_mq_kick_requeue_list. It seems like this split has caused a lot more harm then good, and the other drivers using it that way are probably having issues as well.

Re: [PATCH v3 5/8] nvme: kick requeue list when requeueing a request instead of when starting the queues

2017-07-05 Thread Ming Lei
On Wed, Jul 05, 2017 at 08:00:34PM +0300, Sagi Grimberg wrote: > When we requeue a request, we can always insert the request > back to the scheduler instead of doing it when restarting > the queues and kicking the requeue work, so get rid of > the requeue kick in nvme (core and drivers). > > Also,

Re: [PATCH 8/8] xen-blockfront: quiesce IO before device removal

2017-07-05 Thread Christoph Hellwig
On Wed, Jul 05, 2017 at 09:29:26AM +0300, Sagi Grimberg wrote: > > >> Looks the above change isn't needed since this >> blk_mq_start_stopped_hw_queues() >> should have been the counterpart of blk_mq_stop_hw_queue() in >> blkif_queue_rq(). > > Removed the patch altogether in v2 as I'm not convinced

Re: OOPS from cciss_ioctl in 4.12+git

2017-07-05 Thread Christoph Hellwig
Hi Meelis, can you try the patch below? Also we're trying to move people away from the cciss driver, can you check if the hpsa SCSI driver works for you as well? diff --git a/drivers/block/cciss.c b/drivers/block/cciss.c index 02a611993bb4..678af946be30 100644 --- a/drivers/block/cciss.c +++ b/d

Re: [PATCH v3 4/8] nvme-pci: quiesce/unquiesce admin_q instead of start/stop its hw queues

2017-07-05 Thread Ming Lei
On Wed, Jul 05, 2017 at 08:00:33PM +0300, Sagi Grimberg wrote: > unlike blk_mq_stop_hw_queues and blk_mq_start_stopped_hw_queues > quiescing/unquiescing respects the submission path rcu grace. > > Signed-off-by: Sagi Grimberg > --- > drivers/nvme/host/pci.c | 6 +++--- > 1 file changed, 3 insert

Re: [PATCH v3 2/8] nvme-fc: quiesce/unquiesce admin_q instead of start/stop its hw queues

2017-07-05 Thread Ming Lei
On Wed, Jul 05, 2017 at 08:00:31PM +0300, Sagi Grimberg wrote: > unlike blk_mq_stop_hw_queues and blk_mq_start_stopped_hw_queues > quiescing/unquiescing respects the submission path rcu grace. > > Also, make sure to unquiesce before cleanup the admin queue. > > Reviewed-By: James Smart > Signed-

Re: [PATCH v3 1/8] nvme-rdma: quiesce/unquiesce admin_q instead of start/stop its hw queues

2017-07-05 Thread Ming Lei
On Wed, Jul 05, 2017 at 08:00:30PM +0300, Sagi Grimberg wrote: > unlike blk_mq_stop_hw_queues and blk_mq_start_stopped_hw_queues > quiescing/unquiescing respects the submission path rcu grace. > Also make sure to kick the requeue list when appropriate. > > Signed-off-by: Sagi Grimberg > --- > dr

Re: [PATCH 07/19] bcache: introduce bcache sysfs entries for ioprio-based bypass/writeback hints

2017-07-05 Thread Eric Wheeler
On Wed, 5 Jul 2017, Christoph Hellwig wrote: > On Fri, Jun 30, 2017 at 01:42:56PM -0700, bca...@lists.ewheeler.net wrote: > > From: Eric Wheeler > > > > Add sysfs entries to support to hint for bypass/writeback by the ioprio > > assigned to the bio. If the bio is unassigned, use current's io-con

Re: [PATCH 4/6 v2] mmc: block: move single ioctl() commands to block requests

2017-07-05 Thread Christoph Hellwig
Hi Linus, On Thu, May 18, 2017 at 11:36:14AM +0200, Christoph Hellwig wrote: > On Thu, May 18, 2017 at 11:29:34AM +0200, Linus Walleij wrote: > > We are storing the ioctl() in/out argument as a pointer in > > the per-request struct mmc_blk_request container. > > Btw, for the main ioctl data (not

Re: [PATCH 19/19] bcache: Update continue_at() documentation

2017-07-05 Thread Christoph Hellwig
Looks good, Reviewed-by: Christoph Hellwig

Re: [PATCH 09/19 v2] bcache: update bio->bi_opf bypass/writeback REQ_ flag hints

2017-07-05 Thread Christoph Hellwig
REQ_META should be purely a hint for blktrace, please don't use it in the I/O path - that's what REQ_PRIO is for.

Re: [PATCH 07/19] bcache: introduce bcache sysfs entries for ioprio-based bypass/writeback hints

2017-07-05 Thread Christoph Hellwig
On Fri, Jun 30, 2017 at 01:42:56PM -0700, bca...@lists.ewheeler.net wrote: > From: Eric Wheeler > > Add sysfs entries to support to hint for bypass/writeback by the ioprio > assigned to the bio. If the bio is unassigned, use current's io-context > ioprio for cache writeback or bypass (configured

Re: [PATCH 08/19] bcache: documentation for sysfs entries describing bcache cache hinting

2017-07-05 Thread Christoph Hellwig
should go into the previous patch.

Re: [PATCH 06/19] bcache: explicitly destory mutex while exiting

2017-07-05 Thread Christoph Hellwig
On Fri, Jun 30, 2017 at 01:42:55PM -0700, bca...@lists.ewheeler.net wrote: > From: Liang Chen > > mutex_destroy does nothing most of time, but it's better to call > it to make the code future proof and it also has some meaning > for like mutex debug. It shouldn't really - we should get the destr

Re: [PATCH 05/19] bcache: fix calling ida_simple_remove() with incorrect minor

2017-07-05 Thread Christoph Hellwig
> +#define BCACHE_TO_IDA_MINORS(first_minor) ((first_minor) >> > BCACHE_MINORS_BITS) > +#define IDA_TO_BCACHE_MINORS(minor) ((minor) << BCACHE_MINORS_BITS) Please use inline functions and lower case for these.

Re: [PATCH 03/19] bcache: do not subtract sectors_to_gc for bypassed IO

2017-07-05 Thread Christoph Hellwig
Looks good, Reviewed-by: Christoph Hellwig

Re: [PATCH 02/19] bcache: fix sequential large write IO bypass

2017-07-05 Thread Christoph Hellwig
Looks good, Reviewed-by: Christoph Hellwig

Re: [PATCH 01/19] bcache: Fix leak of bdev reference

2017-07-05 Thread Christoph Hellwig
On Fri, Jun 30, 2017 at 01:42:50PM -0700, bca...@lists.ewheeler.net wrote: > From: Jan Kara > > If blkdev_get_by_path() in register_bcache() fails, we try to lookup the > block device using lookup_bdev() to detect which situation we are in to > properly report error. However we never drop the ref

Re: [PATCH] mtip32xx: avoid to read HOST_CAP from HW in .queue_rq()

2017-07-05 Thread Jens Axboe
On 07/04/2017 10:14 PM, Ming Lei wrote: > It is observed reading the register from HW takes a bit long, > for example in my box, the following difference of 'perf report > --no-children fio ...' can be seen when running I/O: > > 1) V4.12 without patch > +9.28% fio [mtip32xx] [

Re: [PATCH v3 6/8] nbd: quiesce request queues to make sure no submissions are inflight

2017-07-05 Thread Josef Bacik
On Wed, Jul 05, 2017 at 08:00:35PM +0300, Sagi Grimberg wrote: > Unlike blk_mq_stop_hw_queues, blk_mq_quiesce_queue respects the > submission path rcu grace. quiesce the queue before iterating > on live tags. > > Reviewed-by: Ming Lei > Cc: Josef Bacik > Signed-off-by: Sagi Grimberg Sounds fin

Re: [PATCH] mtip32xx: avoid to read HOST_CAP from HW in .queue_rq()

2017-07-05 Thread Christoph Hellwig
mmio reads in the fast path are always a bad idea.. Reviewed-by: Christoph Hellwig

Re: [PATCH v2] block: Fix __blkdev_issue_zeroout loop

2017-07-05 Thread Christoph Hellwig
On Tue, Jul 04, 2017 at 05:27:02PM +0900, Damien Le Moal wrote: > The BIO issuing loop in __blkdev_issue_zeroout() is allocating BIOs > with a maximum number of bvec (pages) equal to > > min(nr_sects, (sector_t)BIO_MAX_PAGES) > > This works since the BIO will always be limited to the absolute max

[PATCH v3 0/8] correct quiescing in several block drivers

2017-07-05 Thread Sagi Grimberg
Before we either iterate on tags we must guarantee that the hw queues are stopped and no inflight .queue_rq is active. Thats what blk_mq_quiesce_queue is for, so use it where appropriate. Note that before we cleanup the request queue, we must unquiesce in order to guarantee to not block on request

[PATCH v3 8/8] virtio_blk: quiesce/unquiesce live IO when entering PM states

2017-07-05 Thread Sagi Grimberg
Without it its not guaranteed that no .queue_rq is inflight. Reviewed-by: Ming Lei Acked-by: Michael S. Tsirkin Cc: virtio-...@lists.oasis-open.org Cc: Jason Wang Signed-off-by: Sagi Grimberg --- drivers/block/virtio_blk.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git

[PATCH v3 3/8] nvme-loop: quiesce/unquiesce admin_q instead of start/stop its hw queues

2017-07-05 Thread Sagi Grimberg
unlike blk_mq_stop_hw_queues and blk_mq_start_stopped_hw_queues quiescing/unquiescing respects the submission path rcu grace. Reviewed-by: Ming Lei Signed-off-by: Sagi Grimberg --- drivers/nvme/target/loop.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/nvme/targ

[PATCH v3 2/8] nvme-fc: quiesce/unquiesce admin_q instead of start/stop its hw queues

2017-07-05 Thread Sagi Grimberg
unlike blk_mq_stop_hw_queues and blk_mq_start_stopped_hw_queues quiescing/unquiescing respects the submission path rcu grace. Also, make sure to unquiesce before cleanup the admin queue. Reviewed-By: James Smart Signed-off-by: Sagi Grimberg --- drivers/nvme/host/fc.c | 5 +++-- 1 file changed,

[PATCH v3 6/8] nbd: quiesce request queues to make sure no submissions are inflight

2017-07-05 Thread Sagi Grimberg
Unlike blk_mq_stop_hw_queues, blk_mq_quiesce_queue respects the submission path rcu grace. quiesce the queue before iterating on live tags. Reviewed-by: Ming Lei Cc: Josef Bacik Signed-off-by: Sagi Grimberg --- drivers/block/nbd.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff

[PATCH v3 5/8] nvme: kick requeue list when requeueing a request instead of when starting the queues

2017-07-05 Thread Sagi Grimberg
When we requeue a request, we can always insert the request back to the scheduler instead of doing it when restarting the queues and kicking the requeue work, so get rid of the requeue kick in nvme (core and drivers). Also, now there is no need start hw queues in nvme_kill_queues We don't stop the

[PATCH v3 7/8] mtip32xx: quiesce request queues to make sure no submissions are inflight

2017-07-05 Thread Sagi Grimberg
Unlike blk_mq_stop_hw_queues, blk_mq_quiesce_queue respects the submission path rcu grace. quiesce the queue before iterating on live tags, or performing device io quiescing. While were at it, verify that the request started in mtip_abort_cmd amd mtip_queue_cmd tag iteration calls. Reviewed-by: M

[PATCH v3 4/8] nvme-pci: quiesce/unquiesce admin_q instead of start/stop its hw queues

2017-07-05 Thread Sagi Grimberg
unlike blk_mq_stop_hw_queues and blk_mq_start_stopped_hw_queues quiescing/unquiescing respects the submission path rcu grace. Signed-off-by: Sagi Grimberg --- drivers/nvme/host/pci.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/nvme/host/pci.c b/drivers/nvme/

[PATCH v3 1/8] nvme-rdma: quiesce/unquiesce admin_q instead of start/stop its hw queues

2017-07-05 Thread Sagi Grimberg
unlike blk_mq_stop_hw_queues and blk_mq_start_stopped_hw_queues quiescing/unquiescing respects the submission path rcu grace. Also make sure to kick the requeue list when appropriate. Signed-off-by: Sagi Grimberg --- drivers/nvme/host/rdma.c | 7 --- 1 file changed, 4 insertions(+), 3 deleti

Re: [PATCH] nvme: remove pci device if no longer present

2017-07-05 Thread Keith Busch
[correcting linux-nvme in the CC] On Wed, Jul 05, 2017 at 12:03:35PM -0400, Keith Busch wrote: > On Sun, Jul 02, 2017 at 08:31:51AM -0700, Christoph Hellwig wrote: > > Please CC the linux-nvme list on any nvme issues. Also this > > code is getting a little too fancy for living in nvme, I think we

Re: [PATCH] nvme: remove pci device if no longer present

2017-07-05 Thread Keith Busch
On Sun, Jul 02, 2017 at 08:31:51AM -0700, Christoph Hellwig wrote: > Please CC the linux-nvme list on any nvme issues. Also this > code is getting a little too fancy for living in nvme, I think we > need to move it into the PCI core, ensure we properly take drv->lock > to synchronize it, and check

OOPS from cciss_ioctl in 4.12+git

2017-07-05 Thread Meelis Roos
Tried todays git snapshot of starting 4.13 tree on some machines. On HP DL380 G4 with cciss storage, there is an OOPS in dmesg but the machine keeps running fine after that. [0.00] Linux version 4.12.0-03441-g19964541c231 (mroos@dl380g4) (gcc version 6.3.0 20170628 (Debian 6.3.0-21) ) #

Re: [PATCH 06/19] bcache: explicitly destory mutex while exiting

2017-07-05 Thread Liang Chen
Hi Coly, Thanks for reviewing the patch! You raised a good point about the race. I also think it should be addressed. Even though the time window is small, it will still happen sooner or later. I would like to keep this "destory mutex" patch unchanged, and send another patch to fix the issue based

Re: [PATCH 1/1] blk-mq: map all HWQ also in hyperthreaded system

2017-07-05 Thread Johannes Thumshirn
On Wed, Jul 05, 2017 at 11:11:36AM +0300, Max Gurtovoy wrote: > Hi Johannes, > this was merge already to the main tree (Jens add it to his pull request) Oops, sorry for the noise. -- Johannes Thumshirn Storage jthumsh...@suse.de

Re: [PATCH 1/1] blk-mq: map all HWQ also in hyperthreaded system

2017-07-05 Thread Max Gurtovoy
On 7/5/2017 10:59 AM, Johannes Thumshirn wrote: On Wed, Jun 28, 2017 at 03:44:40PM +0300, Max Gurtovoy wrote: This patch performs sequential mapping between CPUs and queues. In case the system has more CPUs than HWQs then there are still CPUs to map to HWQs. In hyperthreaded system, map the un

Re: [PATCH 1/1] blk-mq: map all HWQ also in hyperthreaded system

2017-07-05 Thread Johannes Thumshirn
On Wed, Jun 28, 2017 at 03:44:40PM +0300, Max Gurtovoy wrote: > This patch performs sequential mapping between CPUs and queues. > In case the system has more CPUs than HWQs then there are still > CPUs to map to HWQs. In hyperthreaded system, map the unmapped CPUs > and their siblings to the same HW

Re: [PATCH v2 1/8] nvme-rdma: quiesce/unquiesce admin_q instead of start/stop its hw queues

2017-07-05 Thread Ming Lei
On Wed, Jul 05, 2017 at 10:15:28AM +0300, Sagi Grimberg wrote: > > > As I commented yesterday, blk_mq_kick_requeue_list() isn't needed. > > I commented in the cover-letter, I am removing it a two steps to keep > bisection. I'm only allowed to remove it in patch 5/8. The kick requeue list shouldn

Re: [PATCH v2 7/8] mtip32xx: quiesce request queues to make sure no submissions are inflight

2017-07-05 Thread Ming Lei
On Wed, Jul 05, 2017 at 09:53:10AM +0300, Sagi Grimberg wrote: > Unlike blk_mq_stop_hw_queues, blk_mq_quiesce_queue respects the > submission path rcu grace. quiesce the queue before iterating > on live tags, or performing device io quiescing. > > While were at it, verify that the request started

Re: [PATCH v2 5/8] nvme: kick requeue list when requeueing a request instead of when starting the queues

2017-07-05 Thread Ming Lei
On Wed, Jul 05, 2017 at 09:53:08AM +0300, Sagi Grimberg wrote: > When we requeue a request, we can always insert the request > back to the scheduler instead of doing it when restarting > the queues and kicking the requeue work, so get rid of > the requeue kick in nvme (core and drivers). > > Also,

Re: [PATCH v2 4/8] nvme-pci: quiesce/unquiesce admin_q instead of start/stop its hw queues

2017-07-05 Thread Ming Lei
On Wed, Jul 05, 2017 at 09:53:07AM +0300, Sagi Grimberg wrote: > unlike blk_mq_stop_hw_queues and blk_mq_start_stopped_hw_queues > quiescing/unquiescing respects the submission path rcu grace. > > Signed-off-by: Sagi Grimberg > --- > drivers/nvme/host/pci.c | 10 ++ > 1 file changed, 6 i

Re: [PATCH v2 2/8] nvme-fc: quiesce/unquiesce admin_q instead of start/stop its hw queues

2017-07-05 Thread Ming Lei
On Wed, Jul 05, 2017 at 09:53:05AM +0300, Sagi Grimberg wrote: > unlike blk_mq_stop_hw_queues and blk_mq_start_stopped_hw_queues > quiescing/unquiescing respects the submission path rcu grace. > > Also, make sure to unquiesce before cleanup the admin queue. > > Reviewed-By: James Smart > Signed-

Re: [PATCH v2 1/8] nvme-rdma: quiesce/unquiesce admin_q instead of start/stop its hw queues

2017-07-05 Thread Sagi Grimberg
As I commented yesterday, blk_mq_kick_requeue_list() isn't needed. I commented in the cover-letter, I am removing it a two steps to keep bisection. I'm only allowed to remove it in patch 5/8.

Re: [PATCH v2 3/8] nvme-loop: quiesce/unquiesce admin_q instead of start/stop its hw queues

2017-07-05 Thread Ming Lei
On Wed, Jul 05, 2017 at 09:53:06AM +0300, Sagi Grimberg wrote: > unlike blk_mq_stop_hw_queues and blk_mq_start_stopped_hw_queues > quiescing/unquiescing respects the submission path rcu grace. > > Signed-off-by: Sagi Grimberg > --- > drivers/nvme/target/loop.c | 3 ++- > 1 file changed, 2 insert

Re: [PATCH v2 1/8] nvme-rdma: quiesce/unquiesce admin_q instead of start/stop its hw queues

2017-07-05 Thread Ming Lei
On Wed, Jul 05, 2017 at 09:53:04AM +0300, Sagi Grimberg wrote: > unlike blk_mq_stop_hw_queues and blk_mq_start_stopped_hw_queues > quiescing/unquiescing respects the submission path rcu grace. > Also make sure to kick the requeue list when appropriate. > > Signed-off-by: Sagi Grimberg > --- > dr