[PATCH] blk-mq: Always schedule hctx->next_cpu

2016-09-27 Thread Gabriel Krisman Bertazi
Commit 0e87e58bf60e ("blk-mq: improve warning for running a queue on the wrong CPU") attempts to avoid triggering the WARN_ON in __blk_mq_run_hw_queue when the expected CPU is dead. Problem is, in the last batch execution before round robin, blk_mq_hctx_next_cpu can schedule a dead CPU and also

Re: [PATCH v3 5/7] block: Implement support for zoned block devices

2016-09-27 Thread Martin K. Petersen
> "Damien" == Damien Le Moal writes: Damien> Thanks for all the comments. Should I send a fixed-up series or Damien> just send correction patches later ? Please repost with the requested changes in place. Thanks! -- Martin K. Petersen Oracle Linux Engineering

Re: [PATCH v3 6/7] sd: Implement support for ZBC devices

2016-09-27 Thread Martin K. Petersen
> "Damien" == Damien Le Moal writes: Damien, The new stuff looks much cleaner. Thanks for doing that! This hunk has an unintended side effect: @@ -2836,14 +2896,14 @@ static int sd_revalidate_disk(struct gendisk *disk) * react badly if we do. */

Re: [PATCH v3 5/7] block: Implement support for zoned block devices

2016-09-27 Thread Damien Le Moal
Martin, On 9/28/16 12:54, Martin K. Petersen wrote: >> "Damien" == Damien Le Moal writes: > > Purely cosmetic: Looks like whitespace is a bit funky (spaces instead of > tabs several places). Also a few typos. > > + * blkdev_report_zones - Get zones information > +

Re: [PATCH v3 5/7] block: Implement support for zoned block devices

2016-09-27 Thread Martin K. Petersen
> "Damien" == Damien Le Moal writes: Purely cosmetic: Looks like whitespace is a bit funky (spaces instead of tabs several places). Also a few typos. + * blkdev_report_zones - Get zones information + * @bdev: Target block device + * @sector:Sector from which

Re: [PATCH v3 3/7] block: update chunk_sectors in blk_stack_limits()

2016-09-27 Thread Martin K. Petersen
> "Damien" == Damien Le Moal writes: Damien> From: Hannes Reinecke Signed-off-by: Hannes Damien> Reinecke Signed-off-by: Damien Le Moal Damien> --- Reviewed-by: Martin K. Petersen

Re: [PATCH v3 4/7] block: Define zoned block device operations

2016-09-27 Thread Martin K. Petersen
> "Damien" == Damien Le Moal writes: Damien> Define REQ_OP_ZONE_REPORT and REQ_OP_ZONE_RESET for handling Damien> zones of host-managed and host-aware zoned block devices. With Damien> with these two new operations, the total number of operations Damien> defined

Re: [PATCH v3 2/7] blk-sysfs: Add 'chunk_sectors' to sysfs attributes

2016-09-27 Thread Martin K. Petersen
> "Damien" == Damien Le Moal writes: ...same is true for the chunk_sectors attribute. Aside from that: Reviewed-by: Martin K. Petersen -- Martin K. Petersen Oracle Linux Engineering -- To unsubscribe from this list: send the line

Re: [PATCH 0/3] Enabling ATA Command Priorities

2016-09-27 Thread Adam Manzanares
I prefer having the feature conditional so you can use the CFQ scheduler with I/O priorities as is. If you decide to enable the feature then the priorities will be passed down to the drive in addition to the work that the CFQ scheduler does. Since this feature may change the user perceived

Re: [PATCH v3 1/7] block: Add 'zoned' queue limit

2016-09-27 Thread Martin K. Petersen
> "Damien" == Damien Le Moal writes: Damien> The zoned attribute is also exported as a string to applications Damien> via sysfs. BLK_ZONED_NONE shows as "none", BLK_ZONED_HA as Damien> "host-aware" and BLK_ZONED_HM as "host-managed". Looks good. However, you should

Re: [PATCH v3 0/7] ZBC / Zoned block device support

2016-09-27 Thread Christoph Hellwig
The updated series looks fine to me: Reviewed-by: Christoph Hellwig Thanks a lot shaun and Demian for your hard work in the last weeks! -- To unsubscribe from this list: send the line "unsubscribe linux-block" in the body of a message to majord...@vger.kernel.org More majordomo

[PATCH v3 1/7] block: Add 'zoned' queue limit

2016-09-27 Thread Damien Le Moal
Add the zoned queue limit to indicate the zoning model of a block device. Defined values are 0 (BLK_ZONED_NONE) for regular block devices, 1 (BLK_ZONED_HA) for host-aware zone block devices and 2 (BLK_ZONED_HM) for host-managed zone block devices. The standards defined drive managed model is not

[PATCH v3 7/7] blk-zoned: implement ioctls

2016-09-27 Thread Damien Le Moal
From: Shaun Tancheff Adds the new BLKREPORTZONE and BLKRESETZONE ioctls for respectively obtaining the zone configuration of a zoned block device and resetting the write pointer of sequential zones of a zoned block device. The BLKREPORTZONE ioctl maps directly to a single

[PATCH v3 2/7] blk-sysfs: Add 'chunk_sectors' to sysfs attributes

2016-09-27 Thread Damien Le Moal
From: Hannes Reinecke The queue limits already have a 'chunk_sectors' setting, so we should be presenting it via sysfs. Signed-off-by: Hannes Reinecke Signed-off-by: Damien Le Moal --- block/blk-sysfs.c | 11 +++ 1 file changed, 11

[PATCH v3 6/7] sd: Implement support for ZBC devices

2016-09-27 Thread Damien Le Moal
From: Hannes Reinecke Implement ZBC support functions to setup zoned disks, both host-managed and host-aware models. Only zoned disks that satisfy the following conditions are supported: 1) All zones are the same size, with the exception of an eventual last smaller runt zone. 2)

[PATCH v3 4/7] block: Define zoned block device operations

2016-09-27 Thread Damien Le Moal
From: Shaun Tancheff Define REQ_OP_ZONE_REPORT and REQ_OP_ZONE_RESET for handling zones of host-managed and host-aware zoned block devices. With with these two new operations, the total number of operations defined reaches 8 and still fits with the 3 bits definition

Re: [PATCH 0/2]: Add option for async ->queue_rq

2016-09-27 Thread Bart Van Assche
On 09/22/16 07:52, Jens Axboe wrote: Two patches that add the ability for a driver to flag itself as wanting the ->queue_rq() invoked in a manner that allows it to block. We'll need that for the nbd conversion, to avoid having to add workqueue offload. We can use this in the current loop mq path

Re: [PATCH v3 7/7] blk-zoned: implement ioctls

2016-09-27 Thread Christoph Hellwig
Damien, can you do a repost of the whole series with the header reshuffled included? Except for that and the trivial kcalloc bit the series looks fine to me: Reviewed-by: Christoph Hellwig -- To unsubscribe from this list: send the line "unsubscribe linux-block" in the body of a

Re: [PATCH v2 3/7] block: update chunk_sectors in blk_stack_limits()

2016-09-27 Thread Shaun Tancheff
On Mon, Sep 26, 2016 at 6:14 AM, Damien Le Moal wrote: > From: Hannes Reinecke > > Signed-off-by: Hannes Reinecke > Signed-off-by: Damien Le Moal > --- > block/blk-settings.c | 4 > 1 file changed, 4

Re: [PATCH v2 2/7] blk-sysfs: Add 'chunk_sectors' to sysfs attributes

2016-09-27 Thread Shaun Tancheff
On Mon, Sep 26, 2016 at 6:14 AM, Damien Le Moal wrote: > From: Hannes Reinecke > > The queue limits already have a 'chunk_sectors' setting, so > we should be presenting it via sysfs. > > Signed-off-by: Hannes Reinecke > Signed-off-by: Damien

Re: [PATCH v2 1/7] block: Add 'zoned' queue limit

2016-09-27 Thread Shaun Tancheff
On Mon, Sep 26, 2016 at 6:14 AM, Damien Le Moal wrote: > Add the zoned queue limit to indicate the zoning model of a block device. > Defined values are 0 (BLK_ZONED_NONE) for regular block devices, > 1 (BLK_ZONED_HA) for host-aware zone block devices and 2 (BLK_ZONED_HM) >

[PATCH v3 7/7] blk-zoned: implement ioctls

2016-09-27 Thread Shaun Tancheff
Adds the new BLKREPORTZONE and BLKRESETZONE ioctls for respectively obtaining the zone configuration of a zoned block device and resetting the write pointer of sequential zones of a zoned block device. The BLKREPORTZONE ioctl maps directly to a single call of the function blkdev_report_zones. The

[PATCH v3 5/7] block: Implement support for zoned block devices

2016-09-27 Thread Shaun Tancheff
From: Hannes Reinecke Implement zoned block device zone information reporting and reset. Zone information are reported as struct blk_zone. This implementation does not differentiate between host-aware and host-managed device models and is valid for both. Two functions are provided:

Re: [PATCH v2 7/7] blk-zoned: implement ioctls

2016-09-27 Thread Christoph Hellwig
On Mon, Sep 26, 2016 at 06:12:24PM -0500, Shaun Tancheff wrote: > Except our source locations are disjoint (stack and kcalloc'd). Indeed. -- To unsubscribe from this list: send the line "unsubscribe linux-block" in the body of a message to majord...@vger.kernel.org More majordomo info at

[PATCH 2/3] ata: Enabling ATA Command Priorities

2016-09-27 Thread Adam Manzanares
This patch checks to see if an ATA device supports NCQ command priorities. If so and the user has specified an iocontext that indicates IO_PRIO_CLASS_RT then we build a tf with a high priority command. Signed-off-by: Adam Manzanares --- drivers/ata/libata-core.c | 35

[PATCH 3/3] ata: ATA Command Priority Disabled By Default

2016-09-27 Thread Adam Manzanares
Add a sysfs entry to turn on priority information being passed to a ATA device. By default this feature is turned off. This patch depends on ata: Enabling ATA Command Priorities Signed-off-by: Adam Manzanares --- drivers/ata/libahci.c | 1 +

[PATCH 0/3] Enabling ATA Command Priorities

2016-09-27 Thread Adam Manzanares
This patch builds ATA commands with high priority if the iocontext of a process is set to real time. The goal of the patch is to improve tail latencies of workloads that use higher queue depths. Adam Manzanares (3): block: Add iocontext priority to request ata: Enabling ATA Command Priorities

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 wrote: > > > The only user of polling requires its original request be completed in > > its entirety before continuing execution. If the bio needs to be split > >

Re: [PATCH 9/9] [RFC] nvme: Fix a race condition

2016-09-27 Thread Bart Van Assche
On 09/27/2016 09:56 AM, James Bottomley wrote: On Tue, 2016-09-27 at 09:43 -0700, Bart Van Assche wrote: On 09/27/2016 09:31 AM, Steve Wise wrote: @@ -2079,11 +2075,15 @@ EXPORT_SYMBOL_GPL(nvme_kill_queues); void nvme_stop_queues(struct nvme_ctrl *ctrl) { struct nvme_ns *ns; +

RE: [PATCH 9/9] [RFC] nvme: Fix a race condition

2016-09-27 Thread Steve Wise
> On 09/27/2016 09:31 AM, Steve Wise wrote: > >> @@ -2079,11 +2075,15 @@ EXPORT_SYMBOL_GPL(nvme_kill_queues); > >> void nvme_stop_queues(struct nvme_ctrl *ctrl) > >> { > >>struct nvme_ns *ns; > >> + struct request_queue *q; > >> > >>mutex_lock(>namespaces_mutex); > >>

Re: [PATCH 9/9] [RFC] nvme: Fix a race condition

2016-09-27 Thread James Bottomley
On Tue, 2016-09-27 at 09:43 -0700, Bart Van Assche wrote: > On 09/27/2016 09:31 AM, Steve Wise wrote: > > > @@ -2079,11 +2075,15 @@ EXPORT_SYMBOL_GPL(nvme_kill_queues); > > > void nvme_stop_queues(struct nvme_ctrl *ctrl) > > > { > > > struct nvme_ns *ns; > > > + struct request_queue *q; > > >

Re: [PATCH 9/9] [RFC] nvme: Fix a race condition

2016-09-27 Thread Bart Van Assche
On 09/27/2016 09:31 AM, Steve Wise wrote: @@ -2079,11 +2075,15 @@ EXPORT_SYMBOL_GPL(nvme_kill_queues); void nvme_stop_queues(struct nvme_ctrl *ctrl) { struct nvme_ns *ns; + struct request_queue *q; mutex_lock(>namespaces_mutex); list_for_each_entry(ns,

RE: [PATCH 9/9] [RFC] nvme: Fix a race condition

2016-09-27 Thread Steve Wise
> @@ -2079,11 +2075,15 @@ EXPORT_SYMBOL_GPL(nvme_kill_queues); > void nvme_stop_queues(struct nvme_ctrl *ctrl) > { > struct nvme_ns *ns; > + struct request_queue *q; > > mutex_lock(>namespaces_mutex); > list_for_each_entry(ns, >namespaces, list) { > -

Re: [PATCH 5/9] block: Extend blk_freeze_queue_start() to the non-blk-mq path

2016-09-27 Thread Bart Van Assche
On 09/27/2016 07:42 AM, Bart Van Assche wrote: Jens, regarding non-blk-mq mode and q_usage_counter: do you prefer that I rework patch 8/9 such that blk_quiesce_queue() and blk_resume_queue() are only used in blk-mq mode or are you OK with adding a blk_queue_enter() call in get_request() and a

Re: [PATCH 5/9] block: Extend blk_freeze_queue_start() to the non-blk-mq path

2016-09-27 Thread Bart Van Assche
On 09/27/16 06:22, Ming Lei wrote: On Tue, Sep 27, 2016 at 2:27 AM, Bart Van Assche wrote: Signed-off-by: Bart Van Assche --- block/blk-core.c | 15 ++- 1 file changed, 6 insertions(+), 9 deletions(-) diff --git

[PATCH][RESEND] badblocks: fix overlapping check for clearing

2016-09-27 Thread Tomasz Majchrzak
Current bad block clear implementation assumes the range to clear overlaps with at least one bad block already stored. If given range to clear precedes first bad block in a list, the first entry is incorrectly updated. Check not only if stored block end is past clear block end but also if stored

Re: [PATCH 5/9] block: Extend blk_freeze_queue_start() to the non-blk-mq path

2016-09-27 Thread Ming Lei
On Tue, Sep 27, 2016 at 2:27 AM, Bart Van Assche wrote: > Signed-off-by: Bart Van Assche > --- > block/blk-core.c | 15 ++- > 1 file changed, 6 insertions(+), 9 deletions(-) > > diff --git a/block/blk-core.c b/block/blk-core.c

Re: [PATCH] blk-throttle: fix infinite throttling caused by non-cascading timer wheel

2016-09-27 Thread Vivek Goyal
On Mon, Sep 19, 2016 at 03:11:10PM -0600, Jens Axboe wrote: > On 09/19/2016 03:06 PM, Vivek Goyal wrote: > > On Tue, Sep 13, 2016 at 09:46:46AM -0400, Vivek Goyal wrote: > > > > > > Hi Hou Tao, > > > > > > [ CC Tejun and Thomas ] > > > > > > Thanks for the patch. I can reproduce it. I am

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

2016-09-27 Thread Ming Lei
On Mon, 26 Sep 2016 19:00:30 -0400 Keith Busch wrote: > The only user of polling requires its original request be completed in > its entirety before continuing execution. If the bio needs to be split > and chained for any reason, the direct IO path would have waited for

Re: [PATCH 4/9] block: Move blk_freeze_queue() and blk_unfreeze_queue() code

2016-09-27 Thread Johannes Thumshirn
On Tue, Sep 27, 2016 at 08:26:19AM +0200, Hannes Reinecke wrote: > On 09/26/2016 08:27 PM, Bart Van Assche wrote: > > Move the blk_freeze_queue() and blk_unfreeze_queue() implementations > > from block/blk-mq.c to block/blk-core.c. Drop "_mq" from the name of > > the functions that have been

Re: [PATCH 6/9] block: Rename mq_freeze_wq and mq_freeze_depth

2016-09-27 Thread Johannes Thumshirn
On Mon, Sep 26, 2016 at 11:28:08AM -0700, Bart Van Assche wrote: > Since these two structure members are now used in blk-mq and !blk-mq > paths, remove the mq_prefix. This patch does not change any > functionality. > > Signed-off-by: Bart Van Assche > --- Looks good,

Re: [PATCH 5/9] block: Extend blk_freeze_queue_start() to the non-blk-mq path

2016-09-27 Thread Johannes Thumshirn
On Mon, Sep 26, 2016 at 11:27:49AM -0700, Bart Van Assche wrote: > Signed-off-by: Bart Van Assche > --- Looks good, Reviewed-by: Johannes Thumshirn -- Johannes Thumshirn Storage jthumsh...@suse.de

Re: [PATCH 2/9] dm: Fix a race condition related to stopping and starting queues

2016-09-27 Thread Johannes Thumshirn
On Mon, Sep 26, 2016 at 11:26:50AM -0700, Bart Van Assche wrote: > Ensure that all ongoing dm_mq_queue_rq() and dm_mq_requeue_request() > calls have stopped before setting the "queue stopped" flag. This > allows to remove the "queue stopped" test from dm_mq_queue_rq() and >

Re: [PATCH 1/9] blk-mq: Introduce blk_mq_queue_stopped()

2016-09-27 Thread Johannes Thumshirn
On Mon, Sep 26, 2016 at 11:26:26AM -0700, Bart Van Assche wrote: > The function blk_queue_stopped() allows to test whether or not a > traditional request queue has been stopped. Introduce a helper > function that allows block drivers to query easily whether or not > one or more hardware contexts

Re: [PATCH 4/9] block: Move blk_freeze_queue() and blk_unfreeze_queue() code

2016-09-27 Thread Hannes Reinecke
On 09/26/2016 08:27 PM, Bart Van Assche wrote: > Move the blk_freeze_queue() and blk_unfreeze_queue() implementations > from block/blk-mq.c to block/blk-core.c. Drop "_mq" from the name of > the functions that have been moved. > > Signed-off-by: Bart Van Assche > ---

Re: [PATCH 1/9] blk-mq: Introduce blk_mq_queue_stopped()

2016-09-27 Thread Hannes Reinecke
On 09/26/2016 08:26 PM, Bart Van Assche wrote: > The function blk_queue_stopped() allows to test whether or not a > traditional request queue has been stopped. Introduce a helper > function that allows block drivers to query easily whether or not > one or more hardware contexts of a blk-mq queue