[PATCH 1/3] nvme/pci: Start request after doorbell ring

2017-12-21 Thread Keith Busch
This is a performance optimization that allows the hardware to work on a command in parallel with the kernel's stats and timeout tracking. Signed-off-by: Keith Busch <keith.bu...@intel.com> --- drivers/nvme/host/pci.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/d

[PATCH 3/3] block: Polling completion performance optimization

2017-12-21 Thread Keith Busch
When a request completion is polled, the completion task wakes itself up. This is unnecessary, as the task can just set itself back to running. Signed-off-by: Keith Busch <keith.bu...@intel.com> --- fs/block_dev.c | 5 - 1 file changed, 4 insertions(+), 1 deletion(-) diff --gi

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

2017-11-09 Thread Keith Busch
Ahh, I incorporated non-multipath disks into the mix and observing some trouble. Details below: On Thu, Nov 09, 2017 at 06:44:47PM +0100, Christoph Hellwig wrote: > +#ifdef CONFIG_NVME_MULTIPATH > + if (ns->head->disk) { > + sprintf(disk_name, "nvme%dc%dn%d",

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

2017-11-09 Thread Keith Busch
. If this option is enabled only a single > +/dev/nvneXnY device will show up for each NVMe namespaces, Minor typo: should be /dev/nvmeXnY. Otherwise, everything in the series looks good to me and testing on my dual port devices hasn't found any problems. For the whole series: Rev

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

2017-11-06 Thread Keith Busch
Looks good. Reviewed-by: Keith Busch <keith.bu...@intel.com>

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 <keith.bu...@intel.com>

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 <keith.bu...@intel.com>

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 <keith.bu...@intel.com>

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 <keith.bu...@intel.com>

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 >

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

2017-11-04 Thread Keith Busch
On Sat, Nov 04, 2017 at 09:18:25AM +0100, Christoph Hellwig wrote: > On Fri, Nov 03, 2017 at 09:02:04AM -0600, Keith Busch wrote: > > If the namespace has metadata, but the request doesn't have a metadata > > payload attached to it for whatever reason, we can't constr

Re: [PATCH 3/3] nvme: fix eui_show() print format

2017-11-03 Thread Keith Busch
just prints the same as the 'ph' format, which would look like this: 01 02 03 04 05 06 07 08 The change will make it look like this: 01-02-03-04-05-06-07-08 I think that was the original intention. Reviewed-by: Keith Busch <keith.bu...@intel.com>

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

2017-11-03 Thread Keith Busch
On Fri, Nov 03, 2017 at 01:53:40PM +0100, Christoph Hellwig wrote: > > - if (ns && ns->ms && > > + if (ns->ms && > > (!ns->pi_type || ns->ms != sizeof(struct t10_pi_tuple)) && > > !blk_integrity_rq(req) && !blk_rq_is_passthrough(req)) > > return BLK_STS_NOTSUPP; >

Re: [PATCH 07/17] nvme: use ida_simple_{get,remove} for the controller instance

2017-10-19 Thread Keith Busch
This is a good cleanup, and I'd support this patch going in ahead of this series on its own if you want to apply to 4.15 immediately. Reviewed-by: Keith Busch <keith.bu...@intel.com>

Re: [PATCH 13/17] nvme: track subsystems

2017-10-18 Thread Keith Busch
With the series, 'modprobe -r nvme && modprobe nvme' is failing. I can get that to pass with the following: --- @@ -1904,7 +1907,11 @@ static void nvme_free_subsystem(struct device *dev) static void nvme_put_subsystem(struct nvme_subsystem *subsys) { put_device(>dev); + + if

Re: [PATCH 2/2] nvme: use device_add_disk_with_groups()

2017-09-29 Thread Keith Busch
lt;mwi...@suse.com> Looks good. Reviewed-by: Keith Busch <keith.bu...@intel.com>

Re: [PATCH 1/2] block: genhd: add device_add_disk_with_groups

2017-09-29 Thread Keith Busch
groups > and adds them to the device before sending out uevents. > > Signed-off-by: Martin Wilck <mwi...@suse.com> Is NVMe the only one having this problem? Was putting our attributes in the disk's kobj a bad choice? Any, looks fine to me. Reviewed-by: Keith Busch <keith.bu...@intel.com>

Re: [PATCH 8/9] nvme: implement multipath access to nvme subsystems

2017-09-28 Thread Keith Busch
On Mon, Sep 25, 2017 at 03:40:30PM +0200, Christoph Hellwig wrote: > The new block devices nodes for multipath access will show up as > > /dev/nvm-subXnZ Just thinking ahead ... Once this goes in, someone will want to boot their OS from a multipath target. It was a pain getting installers

Re: [PATCH 9/9] nvme: also expose the namespace identification sysfs files for mpath nodes

2017-09-25 Thread Keith Busch
f-by: Christoph Hellwig <h...@lst.de> Looks good. Reviewed-by: Keith Busch <keith.bu...@intel.com>

Re: [PATCH 8/9] nvme: implement multipath access to nvme subsystems

2017-09-25 Thread Keith Busch
ote that these create the new persistent names. Overriding the existing > nvme ones would be nicer, but while that works for the first path, the > normal rule will override it again for each subsequent path. > > Signed-off-by: Christoph Hellwig <h...@lst.de> Looks good. Reviewed-by: Keith Busch <keith.bu...@intel.com>

Re: [PATCH 7/9] nvme: track shared namespaces

2017-09-25 Thread Keith Busch
to struct nvme_ns_link or similar and use the nvme_ns name for the > new structure. But that would involve a lot of churn. > > Signed-off-by: Christoph Hellwig <h...@lst.de> Looks good; I can live with 'nvme_ns_head'. Reviewed-by: Keith Busch <keith.bu...@intel.com>

Re: [PATCH 6/9] nvme: introduce a nvme_ns_ids structure

2017-09-25 Thread Keith Busch
On Mon, Sep 25, 2017 at 03:40:28PM +0200, Christoph Hellwig wrote: > This allows us to manage the various uniqueue namespace identifiers > together instead needing various variables and arguments. > > Signed-off-by: Christoph Hellwig <h...@lst.de> Looks good. Reviewed-by: Kei

Re: [PATCH 5/9] nvme: track subsystems

2017-09-25 Thread Keith Busch
Ns unless > the involved subsystems support multiple controllers. > > Signed-off-by: Christoph Hellwig <h...@lst.de> Looks good. Reviewed-by: Keith Busch <keith.bu...@intel.com>

Re: [PATCH 8/9] nvme: implement multipath access to nvme subsystems

2017-09-25 Thread Keith Busch
On Mon, Sep 25, 2017 at 04:05:17PM +0200, Hannes Reinecke wrote: > On 09/25/2017 03:50 PM, Christoph Hellwig wrote: > > On Mon, Sep 25, 2017 at 03:47:43PM +0200, Hannes Reinecke wrote: > >> Can't we make the multipath support invisible to the host? > >> IE check the shared namespaces before

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

2017-09-22 Thread Keith Busch
On Mon, Sep 18, 2017 at 04:14:53PM -0700, Christoph Hellwig wrote: > +static void nvme_failover_req(struct request *req) > +{ > + struct nvme_ns *ns = req->q->queuedata; > + unsigned long flags; > + > + spin_lock_irqsave(>head->requeue_lock, flags); > +

Re: [PATCH 6/9] nvme: track subsystems

2017-09-21 Thread Keith Busch
On Mon, Sep 18, 2017 at 04:14:50PM -0700, Christoph Hellwig wrote: > +static int nvme_init_subsystem(struct nvme_ctrl *ctrl, struct nvme_id_ctrl > *id) > +{ > + struct nvme_subsystem *subsys, *found; > + > + subsys = kzalloc(sizeof(*subsys), GFP_KERNEL); > + if (!subsys) > +

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

2017-09-21 Thread Keith Busch
On Thu, Sep 21, 2017 at 01:52:50AM +0200, Christoph Hellwig wrote: > I noticed the odd renaming in sysfs and though about gettind rid > of the /dev/nvme/ directory. I just need to come up with a good > name for the device nodes - the name can't contain /dev/nvme* as > nvme-cli would break if it

Re: [PATCH 8/9] nvme: track shared namespaces

2017-09-21 Thread Keith Busch
On Thu, Sep 21, 2017 at 04:37:48PM +0200, Christoph Hellwig wrote: > On Thu, Sep 21, 2017 at 07:22:17AM +0200, Johannes Thumshirn wrote: > > > But head also has connotations in the SAN world. Maybe nvme_ns_chain? > > > > I know that's why I didn't really like it all too much in the first place

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

2017-09-20 Thread Keith Busch
On Mon, Sep 18, 2017 at 04:14:53PM -0700, Christoph Hellwig wrote: This is awesome! Looks great, just a minor comment: > + sprintf(head->disk->disk_name, "nvme/ns%d", head->instance); Naming it 'nvme/ns<#>', kobject_set_name_vargs is going to change that '/' into a '!', so the sysfs entry

Re: [RFC PATCH] blk-mq: Fix lost request during timeout

2017-09-19 Thread Keith Busch
On Tue, Sep 19, 2017 at 03:18:45PM +, Bart Van Assche wrote: > On Tue, 2017-09-19 at 11:07 -0400, Keith Busch wrote: > > The problem is when blk-mq's timeout handler prevents the request from > > completing, and doesn't leave any indication the driver requested to >

Re: [RFC PATCH] blk-mq: Fix lost request during timeout

2017-09-19 Thread Keith Busch
On Tue, Sep 19, 2017 at 11:22:20PM +0800, Ming Lei wrote: > On Tue, Sep 19, 2017 at 11:07 PM, Keith Busch <keith.bu...@intel.com> wrote: > > On Tue, Sep 19, 2017 at 12:16:31PM +0800, Ming Lei wrote: > >> On Tue, Sep 19, 2017 at 7:08 AM, Keith Busch <k

Re: [RFC PATCH] blk-mq: Fix lost request during timeout

2017-09-19 Thread Keith Busch
On Tue, Sep 19, 2017 at 12:16:31PM +0800, Ming Lei wrote: > On Tue, Sep 19, 2017 at 7:08 AM, Keith Busch <keith.bu...@intel.com> wrote: > > > > Indeed that prevents .complete from running concurrently with the > > timeout handler, but scsi_mq_done and nvme_h

Re: [RFC PATCH] blk-mq: Fix lost request during timeout

2017-09-18 Thread Keith Busch
On Mon, Sep 18, 2017 at 11:14:38PM +, Bart Van Assche wrote: > On Mon, 2017-09-18 at 19:08 -0400, Keith Busch wrote: > > On Mon, Sep 18, 2017 at 10:53:12PM +, Bart Van Assche wrote: > > > Are you sure that scenario can happen? The blk-mq core calls >

Re: [RFC PATCH] blk-mq: Fix lost request during timeout

2017-09-18 Thread Keith Busch
On Mon, Sep 18, 2017 at 10:53:12PM +, Bart Van Assche wrote: > On Mon, 2017-09-18 at 18:39 -0400, Keith Busch wrote: > > The nvme driver's use of blk_mq_reinit_tagset only happens during > > controller initialisation, but I'm seeing lost commands well after that > > dur

Re: [RFC PATCH] blk-mq: Fix lost request during timeout

2017-09-18 Thread Keith Busch
On Mon, Sep 18, 2017 at 10:07:58PM +, Bart Van Assche wrote: > On Mon, 2017-09-18 at 18:03 -0400, Keith Busch wrote: > > I think we've always known it's possible to lose a request during timeout > > handling, but just accepted that possibility. It seems to be causing >

[RFC PATCH] blk-mq: Fix lost request during timeout

2017-09-18 Thread Keith Busch
. The block layer's timeout handler will then complete the command if it observes the started flag is no longer set. Note it's possible to lose the command even with this patch. It's just less likely to happen. Signed-off-by: Keith Busch <keith.bu...@intel.com> --- block/blk-mq.

Re: [PATCH 01/10] Initial multipath implementation.

2017-09-13 Thread Keith Busch
On Tue, Sep 12, 2017 at 10:48:22PM -0700, Anish Jhaveri wrote: > On Tue, Sep 12, 2017 at 12:00:44PM -0400, Keith Busch wrote: > > > > I find this patch series confusing to review. You declare these failover > > functions in patch 1, use them in patch 2, but they're not defi

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

2017-08-29 Thread Keith Busch
On Tue, Aug 29, 2017 at 04:55:59PM +0200, Christoph Hellwig wrote: > On Tue, Aug 29, 2017 at 10:54:17AM -0400, Keith Busch wrote: > > It also looks like new submissions will get a new path only from the > > fact that the original/primary is being reset. The controller reset > &g

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

2017-08-29 Thread Keith Busch
On Wed, Aug 23, 2017 at 07:58:15PM +0200, Christoph Hellwig wrote: > + /* Anything else could be a path failure, so should be retried */ > + spin_lock_irqsave(>head->requeue_lock, flags); > + blk_steal_bios(>head->requeue_list, req); > + spin_unlock_irqrestore(>head->requeue_lock,

Re: [PATCH 07/10] nvme: track shared namespaces

2017-08-28 Thread Keith Busch
Looks good. Reviewed-by: Keith Busch <keith.bu...@intel.com>

Re: [PATCH 05/10] nvme: don't blindly overwrite identifiers on disk revalidate

2017-08-28 Thread Keith Busch
Looks good. Reviewed-by: Keith Busch <keith.bu...@intel.com>

Re: [PATCH 04/10] nvme: remove nvme_revalidate_ns

2017-08-28 Thread Keith Busch
Looks good. Reviewed-by: Keith Busch <keith.bu...@intel.com>

Re: [PATCH 03/10] nvme: remove unused struct nvme_ns fields

2017-08-28 Thread Keith Busch
Looks good. Reviewed-by: Keith Busch <keith.bu...@intel.com>

Re: [PATCH 02/10] nvme: allow calling nvme_change_ctrl_state from irq context

2017-08-28 Thread Keith Busch
Looks good. Reviewed-by: Keith Busch <keith.bu...@intel.com>

Re: [PATCH 01/10] nvme: report more detailed status codes to the block layer

2017-08-28 Thread Keith Busch
Looks good. Reviewed-by: Keith Busch <keith.bu...@intel.com>

[PATCH for-next] block: Fix left-over bi_bdev usage

2017-08-23 Thread Keith Busch
The bi_bdev field was replaced with the gendisk. This patch just fixes an omission. Cc: Christoph Hellwig <h...@lst.de> Signed-off-by: Keith Busch <keith.bu...@intel.com> --- block/bio-integrity.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/block/bio-integri

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

2017-08-23 Thread Keith Busch
On Wed, Aug 23, 2017 at 07:58:15PM +0200, Christoph Hellwig wrote: > > TODO: implement sysfs interfaces for the new subsystem and > subsystem-namespace object. Unless we can come up with something > better than sysfs here.. Can we get symlinks from the multipath'ed nvme block device to the

Re: [PATCH 06/10] nvme: track subsystems

2017-08-23 Thread Keith Busch
Looks great. A few minor comments below. On Wed, Aug 23, 2017 at 07:58:11PM +0200, Christoph Hellwig wrote: > +static struct nvme_subsystem *__nvme_find_get_subsystem(const char > *subsysnqn) > +{ > + struct nvme_subsystem *subsys; > + > + lockdep_assert_held(_subsystems_lock); > + > +

Re: [RFC PATCH] nvme: always return IRQ_HANDLED

2017-08-17 Thread Keith Busch
On Thu, Aug 17, 2017 at 02:17:08PM -0600, Jens Axboe wrote: > On 08/17/2017 02:15 PM, Keith Busch wrote: > > On Thu, Aug 17, 2017 at 01:32:20PM -0600, Jens Axboe wrote: > >> We currently have an issue with nvme when polling is used. Just > >> ran some testing on

Re: [Xen-users] File-based domU - Slow storage write since xen 4.8

2017-07-25 Thread Keith Busch
On Fri, Jul 21, 2017 at 07:07:06PM +0200, Benoit Depail wrote: > On 07/21/17 18:07, Roger Pau Monné wrote: > > > > Hm, I'm not sure I follow either. AFAIK this problem came from > > changing the Linux version in the Dom0 (where the backend, blkback is > > running), rather than in the DomU right?

Re: [Xen-users] File-based domU - Slow storage write since xen 4.8

2017-07-21 Thread Keith Busch
On Fri, Jul 21, 2017 at 12:19:39PM +0200, Benoit Depail wrote: > On 07/20/17 19:36, Keith Busch wrote: > > > > As a test, could you throttle the xvdb queue's max_sectors_kb? If I > > followed xen-blkfront correctly, the default should have it set to 44. > > Try settin

Re: [Xen-users] File-based domU - Slow storage write since xen 4.8

2017-07-20 Thread Keith Busch
On Thu, Jul 20, 2017 at 05:12:33PM +0200, Benoit Depail wrote: > > The main issue we are seeing is degraded write performance on storage > devices of Xen PV DomUs, about half (or even a third on our production > setup where NFS is involved) of what we used to have. Read performance is unchanged?

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

Re: [PATCH] pci/vmd: Move srcu cleanup after bus/irq domain removal

2017-06-20 Thread Keith Busch
ng global RCU") > Signed-off-by: Jon Derrick <jonathan.derr...@intel.com> > Acked-by: Keith Busch <keith.bu...@intel.com> > Cc: <sta...@vger.kernel.org> # 4.11 > --- > drivers/pci/host/vmd.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > >

[PATCH] blk-mq: Take tagset lock when updaing hw queues

2017-05-30 Thread Keith Busch
the drivers do not have to be modified in order to be safe. Fixes: 705cda97e ("blk-mq: Make it safe to use RCU to iterate over blk_mq_tag_set.tag_list") Reported-by: Gabriel Krisman Bertazi <kris...@collabora.co.uk> Reviewed-by: Bart Van Assche <bart.vanass...@sandisk.com>

Re: WARNING triggers at blk_mq_update_nr_hw_queues during nvme_reset_work

2017-05-30 Thread Keith Busch
On Tue, May 30, 2017 at 02:00:44PM -0300, Gabriel Krisman Bertazi wrote: > Since the merge window for 4.12, one of the machines in Intel's CI > started to hit the WARN_ON below at blk_mq_update_nr_hw_queues during an > nvme_reset_work. The issue persists with the latest 4.12-rc3, and full > dmesg

Re: [PATCH v2 3/3] blk-mq: remove blk_mq_abort_requeue_list()

2017-05-21 Thread Keith Busch
Looks good. Reviewed-by: Keith Busch <keith.bu...@intel.com>

Re: [PATCH v2 2/3] nvme: avoid to use blk_mq_abort_requeue_list()

2017-05-21 Thread Keith Busch
Looks good. Reviewed-by: Keith Busch <keith.bu...@intel.com>

Re: [PATCH v2 1/3] nvme: use blk_mq_start_hw_queues() in nvme_kill_queues()

2017-05-21 Thread Keith Busch
Looks good. Reviewed-by: Keith Busch <keith.bu...@intel.com>

Re: [PATCH 1/2] nvme: fix race between removing and reseting failure

2017-05-19 Thread Keith Busch
On Fri, May 19, 2017 at 08:52:45PM +0800, Ming Lei wrote: > But I still think it may be better to move nvme_kill_queues() into > nvme_remove_dead_ctrl() as an improvement because during this small > window page cache can be used up by write application, and no writeback > can move on meantime.

Re: [PATCH 2/2] nvme: avoid to hang in remove disk

2017-05-18 Thread Keith Busch
On Thu, May 18, 2017 at 11:35:43PM +0800, Ming Lei wrote: > On Thu, May 18, 2017 at 03:49:31PM +0200, Christoph Hellwig wrote: > > On Wed, May 17, 2017 at 09:27:29AM +0800, Ming Lei wrote: > > > If some writeback requests are submitted just before queue is killed, > > > and these requests may not

Re: [PATCH] nvme: remove disk after hw queue is started

2017-05-08 Thread Keith Busch
On Tue, May 09, 2017 at 12:15:25AM +0800, Ming Lei wrote: > This patch looks working, but seems any 'goto out' in this function > may have rick to cause the same race too. The goto was really intended for handling totally broken contronllers, which isn't the case if someone requested to remove

Re: [PATCH 4/5] nvme: move the retries count to struct nvme_request

2017-04-05 Thread Keith Busch
On Wed, Apr 05, 2017 at 04:18:55PM +0200, Christoph Hellwig wrote: > The way NVMe uses this field is entirely different from the older > SCSI/BLOCK_PC usage, so move it into struct nvme_request. > > Also reduce the size of the file to a unsigned char so that we leave space > for additional

Re: [PATCH v3] blk-mq: remap queues when adding/removing hardware queues

2017-03-31 Thread Keith Busch
itly remap the queues. > > Fixes: 4e68a011428a ("blk-mq: don't redistribute hardware queues on a CPU > hotplug event") > Signed-off-by: Omar Sandoval <osan...@fb.com> This looks good to me. Reviewed-by: Keith Busch <keith.bu...@intel.com>

Re: [PATCH] blk-mq: remap queues when adding/removing hardware queues

2017-03-31 Thread Keith Busch
On Fri, Mar 31, 2017 at 01:30:15PM -0700, Omar Sandoval wrote: > On Fri, Mar 31, 2017 at 04:30:44PM -0400, Keith Busch wrote: > > On Fri, Mar 31, 2017 at 11:59:24AM -0700, Omar Sandoval wrote: > > > @@ -2629,11 +2639,12 @@ void blk_mq_update_nr_hw_queues(struct > > &g

Re: [PATCH] blk-mq: don't complete un-started request in timeout handler

2017-03-22 Thread Keith Busch
corruption or double allocation[1][2], > > when doing I/O and removing NVMe device at the sametime. > > I agree, completing it looks bogus. If the request is in a scheduler or > on a software queue, this won't end well at all. Looks like it was > introduced by this patch: > >

[PATCH 3/3] nvme: Complete all stuck requests

2017-03-01 Thread Keith Busch
unnecessarily fail them. Once the controller has been disabled, the queues will be restarted to force remaining entered requests to end in failure so that blk-mq's hot cpu notifier may progress. Signed-off-by: Keith Busch <keith.bu...@intel.com> --- drivers/nvme/host/core.

[PATCH 2/3] blk-mq: Provide freeze queue timeout

2017-03-01 Thread Keith Busch
A driver may wish to take corrective action if queued requests do not complete within a set time. Signed-off-by: Keith Busch <keith.bu...@intel.com> --- block/blk-mq.c | 9 + include/linux/blk-mq.h | 2 ++ 2 files changed, 11 insertions(+) diff --git a/block/blk-mq.c b/blo

[PATCH 1/3] blk-mq: Export blk_mq_freeze_queue_wait

2017-03-01 Thread Keith Busch
Drivers can start a freeze, so this provides a way to wait for frozen. Signed-off-by: Keith Busch <keith.bu...@intel.com> Reviewed-by: Christoph Hellwig <h...@lst.de> Signed-off-by: Sagi Grimberg <s...@grimberg.me> --- block/blk-mq.c | 3 ++- include/linux/blk-mq.h | 1

[PATCH 0/3] nvme suspend/resume fix

2017-03-01 Thread Keith Busch
this for several hours with fio running buffered writes in the back-ground and rtcwake running suspend/resume at intervals. This succeeded with no fio errors. Keith Busch (3): blk-mq: Export blk_mq_freeze_queue_wait blk-mq: Provide queue freeze wait timeout nvme: Complete all stuck requests block

Re: [PATCHv2 2/2] nvme: Complete all stuck requests

2017-02-28 Thread Keith Busch
On Tue, Feb 28, 2017 at 08:42:19AM +0100, Artur Paszkiewicz wrote: > > I'm observing the same thing when hibernating during mdraid resync on > nvme - it hangs in blk_mq_freeze_queue_wait() after "Disabling non-boot > CPUs ...". The patch guarantees forward progress for blk-mq's hot-cpu notifier

Re: [PATCHv2 2/2] nvme: Complete all stuck requests

2017-02-27 Thread Keith Busch
On Mon, Feb 27, 2017 at 07:27:51PM +0200, Sagi Grimberg wrote: > OK, I think we can get it for fabrics too, need to figure out how to > handle it there too. > > Do you have a reproducer? To repro, I have to run a buffered writer workload then put the system into S3. This fio job seems to

Re: [PATCH 1/2] lightnvm: add generic ocssd detection

2017-02-27 Thread Keith Busch
On Mon, Feb 27, 2017 at 08:35:06PM +0200, Sagi Grimberg wrote: > > On Sat, Feb 25, 2017 at 08:16:04PM +0100, Matias Bjørling wrote: > > > On 02/25/2017 07:21 PM, Christoph Hellwig wrote: > > > > No way in hell. vs is vendor specific and we absolutely can't overload > > > > it with any sort of

Re: [PATCHv2 2/2] nvme: Complete all stuck requests

2017-02-27 Thread Keith Busch
On Mon, Feb 27, 2017 at 03:46:09PM +0200, Sagi Grimberg wrote: > On 24/02/17 02:36, Keith Busch wrote: > > If the block layer has entered requests and gets a CPU hot plug event > > prior to the resume event, it will wait for those requests to exit. If > > the nvme dr

[PATCHv2 1/2] blk-mq: Export blk_mq_freeze_queue_wait

2017-02-23 Thread Keith Busch
Drivers can start a freeze, so this provides a way to wait for frozen. Signed-off-by: Keith Busch <keith.bu...@intel.com> --- block/blk-mq.c | 3 ++- include/linux/blk-mq.h | 1 + 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/block/blk-mq.c b/block/blk-mq.c index 9

[PATCHv2 2/2] nvme: Complete all stuck requests

2017-02-23 Thread Keith Busch
, the driver waits for freeze to complete before completing the controller shutdown. On resume, the driver will unfreeze the queue for new requests to enter once the hardware contexts are reinitialized. Signed-off-by: Keith Busch <keith.bu...@intel.com> --- v1 -> v2: Simplified t

Re: [PATCHv4 4/4] block/sed: Embed function data into the function sequence

2017-02-22 Thread Keith Busch
On Wed, Feb 22, 2017 at 09:47:53AM -0700, Jens Axboe wrote: > I see, I found it now. Guys, let's get this process streamlined a bit > more. This whole thing has been a flurry of patches and patchseries, > posted by either you or Jon. Previous patch series was 1-4 patches > posted by you, and then

Re: OPAL fixups

2017-02-17 Thread Keith Busch
On Fri, Feb 17, 2017 at 01:59:37PM +0100, Christoph Hellwig wrote: > Hi all, > > this contains a few more OPAL-related fixups. It tones down warnings a bit, > allocates the OPAL-ѕpecific data structure in a separate dynamic allocation, > checks for support of Security Send/Receive in NVMe before

Re: [PATCH 4/4] nvme: re-check security protocol support after reset

2017-02-17 Thread Keith Busch
On Fri, Feb 17, 2017 at 01:59:41PM +0100, Christoph Hellwig wrote: > @@ -1789,7 +1789,8 @@ static void nvme_reset_work(struct work_struct *work) > if (result) > goto out; > > - if ((dev->ctrl.oacs & NVME_CTRL_OACS_SEC_SUPP) && !dev->ctrl.opal_dev) { > +

Re: [PATCH 4/4] nvme: support ranged discard requests

2017-02-07 Thread Keith Busch
On Tue, Feb 07, 2017 at 05:46:58PM +0100, Christoph Hellwig wrote: > @@ -1233,6 +1243,8 @@ static void nvme_set_queue_limits(struct nvme_ctrl > *ctrl, > if (ctrl->vwc & NVME_CTRL_VWC_PRESENT) > vwc = true; > blk_queue_write_cache(q, vwc, vwc); > +

Re: [PATCH 1/6] genirq: allow assigning affinity to present but not online CPUs

2017-02-06 Thread Keith Busch
On Sun, Feb 05, 2017 at 05:40:23PM +0100, Christoph Hellwig wrote: > Hi Joe, > > On Fri, Feb 03, 2017 at 08:58:09PM -0500, Joe Korty wrote: > > IIRC, some years ago I ran across a customer system where > > the #cpus_present was twice as big as #cpus_possible. > > > > Hyperthreading was turned

Re: [PATCH for-4.10] blk-mq: Remove unused variable

2017-01-18 Thread Keith Busch
On Wed, Jan 18, 2017 at 02:21:48PM -0800, Jens Axboe wrote: > On 01/18/2017 02:16 PM, Jens Axboe wrote: > > On 01/18/2017 02:21 PM, Keith Busch wrote: > >> Signed-off-by: Keith Busch <keith.bu...@intel.com> > >> Reviewed-by: Christoph Hellwig <h...@lst.de

[PATCH for-4.10] blk-mq: Remove unused variable

2017-01-18 Thread Keith Busch
Signed-off-by: Keith Busch <keith.bu...@intel.com> Reviewed-by: Christoph Hellwig <h...@lst.de> Reviewed-by: Sagi Grimberg <s...@grimberg.me> --- block/blk-mq.c | 1 - 1 file changed, 1 deletion(-) diff --git a/block/blk-mq.c b/block/blk-mq.c index a8e67a1..c3400b5 100644 --

[PATCH 6/6] blk-mq: Remove unused variable

2017-01-04 Thread Keith Busch
Signed-off-by: Keith Busch <keith.bu...@intel.com> --- block/blk-mq.c | 1 - 1 file changed, 1 deletion(-) diff --git a/block/blk-mq.c b/block/blk-mq.c index 0c9a2a3..fae9651 100644 --- a/block/blk-mq.c +++ b/block/blk-mq.c @@ -916,7 +916,6 @@ bool blk_mq_dispatch_rq_list(struct blk_mq_

[PATCH 1/6] irq/affinity: Assign all online CPUs to vectors

2017-01-04 Thread Keith Busch
to something. Signed-off-by: Keith Busch <keith.bu...@intel.com> --- kernel/irq/affinity.c | 9 ++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/kernel/irq/affinity.c b/kernel/irq/affinity.c index 4544b11..b25dce0 100644 --- a/kernel/irq/affinity.c +++ b/kern

[PATCH 3/6] nvme/pci: Start queues after tagset is updated

2017-01-04 Thread Keith Busch
We need to leave the block queues stopped if we're changing the tagset's number of queues. Signed-off-by: Keith Busch <keith.bu...@intel.com> --- drivers/nvme/host/pci.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/nvme/host/pci.c b/drivers/nvme/host/pci.c

[PATCH 2/6] irq/affinity: Assign offline CPUs a vector

2017-01-04 Thread Keith Busch
The offline CPUs need to assigned to something incase they come online later, otherwise anyone using the mapping for things other than affinity will have blank entries for that online CPU. Signed-off-by: Keith Busch <keith.bu...@intel.com> --- kernel/irq/affinity.c | 8 1 file c

Re: [PATCH v2 2/4] block: Add Sed-opal library

2016-12-01 Thread Keith Busch
On Thu, Dec 01, 2016 at 10:53:43AM -0700, Scott Bauer wrote: > > Maybe. I need to look at the TCG spec again (oh my good, what a fucking > > mess), but if I remember the context if it is the whole nvme controller > > and not just a namespace, so a block_device might be the wrong context. > > Then

Re: [PATCH v2 2/4] block: Add Sed-opal library

2016-11-30 Thread Keith Busch
On Tue, Nov 29, 2016 at 02:52:00PM -0700, Scott Bauer wrote: > +struct opal_dev { > + dev_t majmin; > + sed_sec_submit *submit_fn; > + void *submit_data; > + struct opal_lock_unlock lkul; > + const opal_step *funcs; > + void **func_data; > + bool resume_from_suspend; >

Re: [PATCH v2 3/4] nvme: Implement resume_from_suspend and sed block ioctl

2016-11-30 Thread Keith Busch
On Tue, Nov 29, 2016 at 02:52:01PM -0700, Scott Bauer wrote: > +static int nvme_sec_submit(void *data, u16 spsp, u8 secp, void *buffer, > +size_t len, bool send) > +{ > + struct request_queue *q; > + struct request *req; > + struct nvme_ns *ns; > + struct

Re: [PATCH v2 2/5] block: add support for REQ_OP_WRITE_ZEROES

2016-11-18 Thread Keith Busch
On Thu, Nov 17, 2016 at 02:17:11PM -0800, Chaitanya Kulkarni wrote: > From: Chaitanya Kulkarni > > This adds a new block layer operation to zero out a range of > LBAs. This allows to implement zeroing for devices that don't use > either discard with a predictable

Re: [PATCH v1 2/7] lib: Add Sed-opal library

2016-11-16 Thread Keith Busch
On Wed, Nov 16, 2016 at 04:17:27PM -0700, Scott Bauer wrote: > +int opal_unlock_from_suspend(struct opal_suspend_unlk *data) > +{ > + const char *diskname = data->name; > + struct opal_dev *iter, *dev = NULL; > + struct opal_completion *completion; > + void *func_data[3] = { NULL

Re: [PATCH 2/5] block: add support for REQ_OP_WRITE_ZEROES

2016-11-16 Thread Keith Busch
On Tue, Nov 15, 2016 at 10:50:36PM -0800, Chaitanya Kulkarni wrote: > This adds a new block layer operation to zero out a range of > LBAs. This allows to implement zeroing for devices that don't use > either discard with a predictable zero pattern or WRITE SAME of zeroes. > The prominent example

Re: [PATCH 1/2] nvme: untangle 0 and BLK_MQ_RQ_QUEUE_OK

2016-11-15 Thread Keith Busch
t; Yeah, we've been depending on the values of BLK_MQ_RQ_QUEUE_[ERROR|BUSY] not being zero without this. Looks good. Reviewed-by: Keith Busch <keith.bu...@intel.com> > --- > drivers/nvme/host/core.c | 4 ++-- > drivers/nvme/host/pci.c| 8 > drivers/nvme/host/r

Re: [RFC PATCH 5/6] nvme: Add unlock_from_suspend

2016-11-10 Thread Keith Busch
On Thu, Nov 10, 2016 at 04:01:31PM -0700, Scott Bauer wrote: > On Tue, Nov 01, 2016 at 06:57:05AM -0700, Christoph Hellwig wrote: > > blk_execute_rq_nowait is the API to use - blk_mq_insert_request isn't > > even exported. > > I remember now, after I changed it to use rq_nowait, why we added this

Re: Higher block layer latency in kernel v4.8-r6 vs. v4.4.16 for NVMe

2016-11-10 Thread Keith Busch
On Wed, Nov 09, 2016 at 01:43:55AM +, Alana Alexander-Rutledge wrote: > Hi, > > I have been profiling the performance of the NVMe and SAS IO stacks on Linux. > I used blktrace and blkparse to collect block layer trace points and a > custom analysis script on the trace points to average out

Re: [PATCH v3 0/11] Fix race conditions related to stopping block layer queues

2016-10-20 Thread Keith Busch
On Wed, Oct 19, 2016 at 04:51:18PM -0700, Bart Van Assche wrote: > > I assume that line 498 in blk-mq.c corresponds to BUG_ON(blk_queued_rq(rq))? > Anyway, it seems to me like this is a bug in the NVMe code and also that > this bug is completely unrelated to my patch series. In nvme_complete_rq()

Re: [PATCH v3 0/11] Fix race conditions related to stopping block layer queues

2016-10-19 Thread Keith Busch
Hi Bart, I'm running linux 4.9-rc1 + linux-block/for-linus, and alternating tests with and without this series. Without this, I'm not seeing any problems in a link-down test while running fio after ~30 runs. With this series, I only see the test pass infrequently. Most of the time I observe one

Re: [PATCH] blk-mq: Return invalid cookie if bio was split

2016-09-27 Thread Keith Busch
On Tue, Sep 27, 2016 at 05:25:36PM +0800, Ming Lei wrote: > On Mon, 26 Sep 2016 19:00:30 -0400 > Keith Busch <keith.bu...@intel.com> wrote: > > > The only user of polling requires its original request be completed in > > its entirety before continuing execution. I

[PATCH] blk-mq: Return invalid cookie if bio was split

2016-09-26 Thread Keith Busch
if the remaining transfer has not yet completed. This patch has blk-mq return an invalid cookie if a bio requires splitting so that polling does not occur. Signed-off-by: Keith Busch <keith.bu...@intel.com> --- block/blk-mq.c | 6 -- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/blo

<    1   2   3   4   >