[PATCH V6 04/14] scsi: sd_zbc: Use well defined macros

2017-10-02 Thread Damien Le Moal
instead of open coding, use the min() macro to calculate a report zones reply buffer length in sd_zbc_check_zone_size() and the round_up() macro for calculating the number of zones in sd_zbc_setup(). No functional change is introduced by this patch. Signed-off-by: Damien Le Moal <damien.

[PATCH V6 09/14] scsi: sd_zbc: Disable zone write locking with scsi-mq

2017-10-02 Thread Damien Le Moal
-by: Damien Le Moal <damien.lem...@wdc.com> Reviewed-by: Bart Van Assche <bart.vanass...@wdc.com> Reviewed-by: Johannes Thumshirn <jthumsh...@suse.de> Reviewed-by: Christoph Hellwig <h...@lst.de> --- drivers/scsi/sd_zbc.c | 9 +++-- 1 file changed, 7 insertions(+), 2 deletions(

[PATCH V6 03/14] scsi: sd_zbc: Rearrange code

2017-10-02 Thread Damien Le Moal
Rearrange sd_zbc_setup() to include use_16_for_rw and use_10_for_rw assignments and move the calculation of sdkp->zone_shift together with the assignment of the verified zone_blocks value in sd_zbc_check_zone_size(). No functional change is introduced by this patch. Signed-off-by: Damien Le M

[PATCH V6 06/14] block: Add zoned block device information to request queue

2017-10-02 Thread Damien Le Moal
are sequential zones (write preferred or write required). These two fields are initialized by the low level block device driver (sd.c for ZBC/ZAC disks). They are not initialized by stacking drivers (device mappers) handling zoned block devices (e.g. dm-linear). Signed-off-by: Damien Le Moal

[PATCH V6 08/14] scsi: sd_zbc: Limit zone write locking to sequential zones

2017-10-02 Thread Damien Le Moal
to be issued to conventional zones, locking only sequential zones. While at it, remove the helper sd_zbc_zone_no() and use blk_rq_zone_no() instead. Signed-off-by: Damien Le Moal <damien.lem...@wdc.com> --- drivers/scsi/sd_zbc.c | 32 1 file changed, 12 inse

[PATCH V6 13/14] block: mq-deadline: Limit write request dispatch for zoned block devices

2017-10-02 Thread Damien Le Moal
unlocking the target zone of a completed write request in dd_completed_request() ensure that the search does not pickup a write request in the middle of a zone queued write sequence. Signed-off-by: Damien Le Moal <damien.lem...@wdc.com> --- block/mq-deadline.

[PATCH V6 14/14] block: do not set mq default scheduler

2017-10-02 Thread Damien Le Moal
scheduler to mq-deadline for single hardware queue disks. A udev rule can be used to easily do the same later in the system initialization sequence, when the device characteristics are known. Signed-off-by: Damien Le Moal <damien.lem...@wdc.com> --- block/elevator.c | 17 ++---

[PATCH V6 10/14] block: mq-deadline: Add zoned block device data

2017-10-02 Thread Damien Le Moal
-by: Damien Le Moal <damien.lem...@wdc.com> --- block/mq-deadline.c | 48 1 file changed, 44 insertions(+), 4 deletions(-) diff --git a/block/mq-deadline.c b/block/mq-deadline.c index a1cad4331edd..f0c01ef934b4 100644 --- a/block/mq-deadline.c

[PATCH V6 02/14] scsi: sd_zbc: Fix comments and indentation

2017-10-02 Thread Damien Le Moal
Fix comments style (use kernel-doc style) and content to clarify some functions. Also fix some functions signature indentation and remove a useless blank line in sd_zbc_read_zones(). No functional change is introduced by this patch. Signed-off-by: Damien Le Moal <damien.lem...@wdc.com> Re

[PATCH V6 11/14] blokc: mq-deadline: Introduce dispatch helpers

2017-10-02 Thread Damien Le Moal
Avoid directly referencing the next_rq and fifo_list arrays using the helper functions deadline_next_request() and deadline_fifo_request() to facilitate changes in the dispatch request selection in __dd_dispatch_request(). Signed-off-by: Damien Le Moal <damien.lem...@wdc.com> Reviewed-by

[PATCH V6 01/14] scsi: sd_zbc: Move ZBC declarations to scsi_proto.h

2017-10-02 Thread Damien Le Moal
by this patch. Signed-off-by: Damien Le Moal <damien.lem...@wdc.com> Reviewed-by: Bart Van Assche <bart.vanass...@wdc.com> Reviewed-by: Johannes Thumshirn <jthumsh...@suse.de> Reviewed-by: Christoph Hellwig <h...@lst.de> --- drivers/scsi/sd_zbc.c | 24 --

[PATCH V6 00/14] scsi-mq support for ZBC disks

2017-10-02 Thread Damien Le Moal
by introducing scsi_disk_from_queue() Damien Le Moal (14): scsi: sd_zbc: Move ZBC declarations to scsi_proto.h scsi: sd_zbc: Fix comments and indentation scsi: sd_zbc: Rearrange code scsi: sd_zbc: Use well defined macros scsi: sd_zbc: Fix sd_zbc_read_zoned_characteristics() block: Add

[PATCH V6 07/14] scsi: sd_zbc: Initialize device request queue zoned data

2017-10-02 Thread Damien Le Moal
of zones to stabilize on the second revalidation pass to allocate and initialize the bitmaps. Signed-off-by: Damien Le Moal <damien.lem...@wdc.com> --- drivers/scsi/sd_zbc.c | 138 -- 1 file changed, 133 insertions(+), 5 deletions(-) diff

[PATCH V6 05/14] scsi: sd_zbc: Fix sd_zbc_read_zoned_characteristics()

2017-10-02 Thread Damien Le Moal
er.kernel.org> Signed-off-by: Damien Le Moal <damien.lem...@wdc.com> Reviewed-by: Bart Van Assche <bart.vanass...@wdc.com> Reviewed-by: Johannes Thumshirn <jthumsh...@suse.de> Reviewed-by: Christoph Hellwig <h...@lst.de> --- drivers/scsi/sd_zbc.c | 6 +++--- 1 file change

Re: [PATCH V5 13/14] block: mq-deadline: Limit write request dispatch for zoned block devices

2017-10-01 Thread Damien Le Moal
On Mon, 2017-09-25 at 22:06 +, Bart Van Assche wrote: > On Mon, 2017-09-25 at 15:14 +0900, Damien Le Moal wrote: > > - return rq_entry_fifo(dd->fifo_list[data_dir].next); > > + if (!dd->zones_wlock || data_dir == READ) > > + return rq_entry_fifo(d

Re: [PATCH V5 12/14] block: mq-deadline: Introduce zone locking support

2017-10-01 Thread Damien Le Moal
Bart, On Mon, 2017-09-25 at 22:00 +, Bart Van Assche wrote: > On Mon, 2017-09-25 at 15:14 +0900, Damien Le Moal wrote: > > +static inline bool deadline_request_needs_zone_wlock(struct deadline_data > > *dd, > > +

Re: [PATCH V5 10/14] block: mq-deadline: Add zoned block device data

2017-10-01 Thread Damien Le Moal
Bart, On Mon, 2017-09-25 at 21:34 +, Bart Van Assche wrote: > On Mon, 2017-09-25 at 15:14 +0900, Damien Le Moal wrote: > > Modify mq-dealine init_queue and exit_queue elevator methods to handle > > ^^ > mq-deadline ? > > > +static in

Re: [PATCH V5 07/14] scsi: sd_zbc: Initialize device request queue zoned data

2017-10-01 Thread Damien Le Moal
On Mon, 2017-09-25 at 21:17 +, Bart Van Assche wrote: > On Mon, 2017-09-25 at 15:14 +0900, Damien Le Moal wrote: > > + return kzalloc_node(BITS_TO_LONGS(sdkp->nr_zones) > > + * sizeof(unsigned long), > > Does this

[PATCH V5 13/14] block: mq-deadline: Limit write request dispatch for zoned block devices

2017-09-25 Thread Damien Le Moal
batch is not done. Signed-off-by: Damien Le Moal <damien.lem...@wdc.com> --- block/mq-deadline.c | 62 + 1 file changed, 58 insertions(+), 4 deletions(-) diff --git a/block/mq-deadline.c b/block/mq-deadline.c index 186c32099845..fc3e50

[PATCH V5 05/14] scsi: sd_zbc: Fix sd_zbc_read_zoned_characteristics()

2017-09-25 Thread Damien Le Moal
er.kernel.org> Signed-off-by: Damien Le Moal <damien.lem...@wdc.com> Reviewed-by: Bart Van Assche <bart.vanass...@wdc.com> Reviewed-by: Johannes Thumshirn <jthumsh...@suse.de> Reviewed-by: Christoph Hellwig <h...@lst.de> --- drivers/scsi/sd_zbc.c | 6 +++--- 1 file change

[PATCH V5 14/14] block: do not set mq default scheduler

2017-09-25 Thread Damien Le Moal
scheduler to mq-deadline for single hardware queue disks. A udev rule can be used to easily do the same later in the system initialization sequence, when the device characteristics are known. Signed-off-by: Damien Le Moal <damien.lem...@wdc.com> --- block/elevator.c | 17 ++---

[PATCH V5 00/14] scsi-mq support for ZBC disks

2017-09-25 Thread Damien Le Moal
files) * Split (former) patch 4 into multiple patches to facilitate review * Fixed scsi disk lookup from io scheduler by introducing scsi_disk_from_queue() Damien Le Moal (14): scsi: sd_zbc: Move ZBC declarations to scsi_proto.h scsi: sd_zbc: Fix comments and indentation scsi: sd_zbc

[PATCH V5 10/14] block: mq-deadline: Add zoned block device data

2017-09-25 Thread Damien Le Moal
initialization and cleanup of the zone write lock bitmap. Signed-off-by: Damien Le Moal <damien.lem...@wdc.com> --- block/mq-deadline.c | 50 ++ 1 file changed, 46 insertions(+), 4 deletions(-) diff --git a/block/mq-deadline.c b/block/mq-dead

[PATCH V5 02/14] scsi: sd_zbc: Fix comments and indentation

2017-09-25 Thread Damien Le Moal
Fix comments style (use kernel-doc style) and content to clarify some functions. Also fix some functions signature indentation and remove a useless blank line in sd_zbc_read_zones(). No functional change is introduced by this patch. Signed-off-by: Damien Le Moal <damien.lem...@wdc.com> Re

[PATCH V5 07/14] scsi: sd_zbc: Initialize device request queue zoned data

2017-09-25 Thread Damien Le Moal
of zones to stabilize on the second revalidation pass to allocate and initialize the bitmaps. Signed-off-by: Damien Le Moal <damien.lem...@wdc.com> --- drivers/scsi/sd_zbc.c | 144 -- 1 file changed, 139 insertions(+), 5 deletions(-) diff

[PATCH V5 06/14] block: Add zoned block device information to request queue

2017-09-25 Thread Damien Le Moal
are sequential zones (write preferred or write required). These two fields are initialized by the low level block device driver (sd.c for ZBC/ZAC disks). They are not initialized by stacking drivers (device mappers) handling zoned block devices (e.g. dm-linear). Signed-off-by: Damien Le Moal

[PATCH V5 01/14] scsi: sd_zbc: Move ZBC declarations to scsi_proto.h

2017-09-25 Thread Damien Le Moal
by this patch. Signed-off-by: Damien Le Moal <damien.lem...@wdc.com> Reviewed-by: Bart Van Assche <bart.vanass...@wdc.com> Reviewed-by: Johannes Thumshirn <jthumsh...@suse.de> Reviewed-by: Christoph Hellwig <h...@lst.de> --- drivers/scsi/sd_zbc.c | 24 --

[PATCH V5 09/14] scsi: sd_zbc: Disable zone write locking with scsi-mq

2017-09-25 Thread Damien Le Moal
-by: Damien Le Moal <damien.lem...@wdc.com> Reviewed-by: Bart Van Assche <bart.vanass...@wdc.com> Reviewed-by: Johannes Thumshirn <jthumsh...@suse.de> Reviewed-by: Christoph Hellwig <h...@lst.de> --- drivers/scsi/sd_zbc.c | 9 +++-- 1 file changed, 7 insertions(+), 2 deletions(

[PATCH V5 03/14] scsi: sd_zbc: Rearrange code

2017-09-25 Thread Damien Le Moal
Rearrange sd_zbc_setup() to include use_16_for_rw and use_10_for_rw assignments and move the calculation of sdkp->zone_shift together with the assignment of the verified zone_blocks value in sd_zbc_check_zone_size(). No functional change is introduced by this patch. Signed-off-by: Damien Le M

[PATCH V5 12/14] block: mq-deadline: Introduce zone locking support

2017-09-25 Thread Damien Le Moal
private data to store the value RQ_ZONE_WLOCKED. Testing for this value allows quick decision in dd_insert_request() and dd_completed_request() regarding the need for unlocking the target zone of a request. Signed-off-by: Damien Le Moal <damien.lem...@wdc.com> --- block/mq-deadline.c

[PATCH V5 08/14] scsi: sd_zbc: Limit zone write locking to sequential zones

2017-09-25 Thread Damien Le Moal
to be issued to conventional zones, locking only sequential zones. While at it, remove the helper sd_zbc_zone_no() and use blk_rq_zone_no() instead. Signed-off-by: Damien Le Moal <damien.lem...@wdc.com> --- drivers/scsi/sd_zbc.c | 32 1 file changed, 12 inse

[PATCH V5 04/14] scsi: sd_zbc: Use well defined macros

2017-09-25 Thread Damien Le Moal
instead of open coding, use the min() macro to calculate a report zones reply buffer length in sd_zbc_check_zone_size() and the round_up() macro for calculating the number of zones in sd_zbc_setup(). No functional change is introduced by this patch. Signed-off-by: Damien Le Moal <damien.

[PATCH V5 11/14] blokc: mq-deadline: Introduce dispatch helpers

2017-09-25 Thread Damien Le Moal
Avoid directly referencing the next_rq and fifo_list arrays using the helper functions deadline_next_request() and deadline_fifo_request() to facilitate changes in the dispatch request selection in __dd_dispatch_request(). Signed-off-by: Damien Le Moal <damien.lem...@wdc.com> --- bl

Re: [PATCH V4 11/16] block: mq-deadline: Introduce zones_wlock attribute

2017-09-24 Thread Damien Le Moal
On 9/24/17 17:19, Christoph Hellwig wrote: > On Sun, Sep 24, 2017 at 04:02:42PM +0900, Damien Le Moal wrote: >> Zone write locking is mandatory for host managed zoned block devices so >> that sequential write order can be maintained. This is however optional >> for host aware

Re: [PATCH V4 08/16] scsi: sd_zbc: Limit zone write locking to sequential zones

2017-09-24 Thread Damien Le Moal
seq(cmd->request)) > return BLKPREP_OK; > ? Arrg ! Good catch. I tested only the scsi-mq case which does not use this path anymore (same test used, but at the scheduler level). Silly of me. I should have properly tested all cases. Will fix this. Thanks. -- Damien Le Moal Western Digital Research

Re: [PATCH V4 10/16] block: mq-deadline: Add zoned block device data

2017-09-24 Thread Damien Le Moal
ck); >> +ret = deadline_zoned_init_queue(q, dd); >> +if (ret) { >> +kfree(dd); >> +kobject_put(>kobj); >> + return ret; >> +} >> + >> q->elevator = eq; >> return 0; > > This should probably grow goto based unwinding, e.g. OK. Will update. Thanks ! -- Damien Le Moal Western Digital Research

Re: [PATCH V4 07/16] scsi: sd_zbc: Initialize device request queue zoned data

2017-09-24 Thread Damien Le Moal
0] & 0x0f; >> +cond = (rec[1] >> 4) & 0xf; >> +if (type != ZBC_ZONE_TYPE_CONV && >> +cond != ZBC_ZONE_COND_READONLY && >> +cond != ZBC_ZONE_COND_OFFLINE) >> +

Re: [PATCH V4 00/16] scsi-mq support for ZBC disks

2017-09-24 Thread Damien Le Moal
ched.txt >> create mode 100644 block/zoned-iosched.c >> create mode 100644 include/linux/blk-mq-debugfs.h >> create mode 100644 include/linux/blk-mq-sched.h > > This still seems to document the previous version. Did it get > any smaller by merging the zoned schedule

Re: [PATCH V4 06/16] block: Add zoned block device information to request queue

2017-09-24 Thread Damien Le Moal
Will send a V5 with your suggested modifications. -- Damien Le Moal Western Digital Research

[PATCH V4 00/16] scsi-mq support for ZBC disks

2017-09-24 Thread Damien Le Moal
scsi_disk_from_queue() Damien Le Moal (16): scsi: sd_zbc: Move ZBC declarations to scsi_proto.h scsi: sd_zbc: Fix comments and indentation scsi: sd_zbc: Rearrange code scsi: sd_zbc: Use well defined macros scsi: sd_zbc: Fix sd_zbc_read_zoned_characteristics() block: Add zoned block

[PATCH V4 09/16] scsi: sd_zbc: Disable zone write locking with scsi-mq

2017-09-24 Thread Damien Le Moal
-by: Damien Le Moal <damien.lem...@wdc.com> Reviewed-by: Bart Van Assche <bart.vanass...@wdc.com> Reviewed-by: Johannes Thumshirn <jthumsh...@suse.de> --- drivers/scsi/sd_zbc.c | 7 ++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/drivers/scsi/sd_zbc.c b/drivers/s

[PATCH V4 07/16] scsi: sd_zbc: Initialize device request queue zoned data

2017-09-24 Thread Damien Le Moal
and number of zones to stabilize on the second revalidation pass to allocate and initialize the bitmaps. Signed-off-by: Damien Le Moal <damien.lem...@wdc.com> --- drivers/scsi/sd_zbc.c | 130 +++--- 1 file changed, 124 insertions(+), 6 deletions(-) diff

[PATCH V4 06/16] block: Add zoned block device information to request queue

2017-09-24 Thread Damien Le Moal
are sequential (write preferred or write required) zones. These two fields can be initialized by the low level block device driver (sd.c for ZBC/ZAC disks), and if desired, by stacking drivers too (device mappers). Signed-off-by: Damien Le Moal <damien.lem...@wdc.com> --- include/linux/blkdev.

[PATCH V4 02/16] scsi: sd_zbc: Fix comments and indentation

2017-09-24 Thread Damien Le Moal
Fix comments style (use kernel-doc style) and content to clarify some functions. Also fix some functions signature indentation and remove a useless blank line in sd_zbc_read_zones(). No functional change is introduced by this patch. Signed-off-by: Damien Le Moal <damien.lem...@wdc.

[PATCH V4 08/16] scsi: sd_zbc: Limit zone write locking to sequential zones

2017-09-24 Thread Damien Le Moal
to be issued to conventional zones, locking only sequential zones. Signed-off-by: Damien Le Moal <damien.lem...@wdc.com> --- drivers/scsi/sd_zbc.c | 23 ++- 1 file changed, 14 insertions(+), 9 deletions(-) diff --git a/drivers/scsi/sd_zbc.c b/drivers/scsi/sd_zbc.c

[PATCH V4 14/16] block: mq-deadline: Limit write dispatch for zoned block devices

2017-09-24 Thread Damien Le Moal
batch is not done. Signed-off-by: Damien Le Moal <damien.lem...@wdc.com> --- block/mq-deadline.c | 61 + 1 file changed, 57 insertions(+), 4 deletions(-) diff --git a/block/mq-deadline.c b/block/mq-deadline.c index 2de1a36c34f5..8725b4

[PATCH V4 16/16] block: mq-deadline: Update documentation

2017-09-24 Thread Damien Le Moal
Added description of the zones_wlock tunable attribute. Signed-off-by: Damien Le Moal <damien.lem...@wdc.com> --- Documentation/block/deadline-iosched.txt | 17 + 1 file changed, 17 insertions(+) diff --git a/Documentation/block/deadline-iosched.txt b/Documentation

[PATCH V4 15/16] block: do not set mq defaulte scheduler

2017-09-24 Thread Damien Le Moal
the default scheduler to mq-deadline for single hardware queue disks. udev can be used to easily do the same later in the system initialization sequence, when the device characteristics are known. Signed-off-by: Damien Le Moal <damien.lem...@wdc.com> --- block/elevator.c | 17 ++---

[PATCH V4 11/16] block: mq-deadline: Introduce zones_wlock attribute

2017-09-24 Thread Damien Le Moal
). Signed-off-by: Damien Le Moal <damien.lem...@wdc.com> --- block/mq-deadline.c | 43 +-- 1 file changed, 41 insertions(+), 2 deletions(-) diff --git a/block/mq-deadline.c b/block/mq-deadline.c index 53b1d16179ad..fb88fee0fb54 100644 --- a/block/mq-dead

[PATCH V4 10/16] block: mq-deadline: Add zoned block device data

2017-09-24 Thread Damien Le Moal
to atomically handle zone locking with other processing. Modify mq-dealine init_queue and exit_queue elevator methods to handle initialization and cleanup of these fields. Signed-off-by: Damien Le Moal <damien.lem...@wdc.com> --- block/mq-deadline.

[PATCH V4 04/16] scsi: sd_zbc: Use well defined macros

2017-09-24 Thread Damien Le Moal
instead of open coding, use the min() macro to calculate a report zones reply buffer length in sd_zbc_check_zone_size() and the round_up() macro for calculating the number of zones in sd_zbc_setup(). No functional change is introduced by this patch. Signed-off-by: Damien Le Moal <damien.

[PATCH V4 05/16] scsi: sd_zbc: Fix sd_zbc_read_zoned_characteristics()

2017-09-24 Thread Damien Le Moal
er.kernel.org> Signed-off-by: Damien Le Moal <damien.lem...@wdc.com> Reviewed-by: Bart Van Assche <bart.vanass...@wdc.com> Reviewed-by: Johannes Thumshirn <jthumsh...@suse.de> Reviewed-by: Christoph Hellwig <h...@lst.de> --- drivers/scsi/sd_zbc.c | 6 +++--- 1 file change

[PATCH V4 13/16] block: mq-deadline: Introduce zone locking support

2017-09-24 Thread Damien Le Moal
private data to store the value RQ_ZONE_WLOCKED. Testing for this value allows quick decision in dd_insert_request() and dd_completed_request() regarding the need for unlocking the target zone of a request. Signed-off-by: Damien Le Moal <damien.lem...@wdc.com> --- block/mq-deadline.c

[PATCH V4 12/16] blokc: mq-deadline: Introduce dispatch helpers

2017-09-24 Thread Damien Le Moal
Avoid directly referencing the next_rq and fifo_list arrays using the helper functions deadline_next_request() and deadline_fifo_request() to facilitate changes in the dispatch request selection in __dd_dispatch_request(). Signed-off-by: Damien Le Moal <damien.lem...@wdc.com> --- bl

[PATCH V4 03/16] scsi: sd_zbc: Rearrange code

2017-09-24 Thread Damien Le Moal
Rearrange sd_zbc_setup() to include use_16_for_rw and use_10_for_rw assignments and move the calculation of sdkp->zone_shift together with the assignment of the verified zone_blocks value in sd_zbc_check_zone_size(). No functional change is introduced by this patch. Signed-off-by: Damien Le M

[PATCH V4 00/16] scsi-mq support for ZBC disks

2017-09-24 Thread Damien Le Moal
scsi_disk_from_queue() Damien Le Moal (12): block: Fix declaration of blk-mq debugfs functions block: Fix declaration of blk-mq scheduler functions block: Add zoned block device information to request queue scsi: sd_zbc: Move ZBC declarations to scsi_proto.h scsi: sd_zbc: Fix comments

[PATCH V4 01/16] scsi: sd_zbc: Move ZBC declarations to scsi_proto.h

2017-09-24 Thread Damien Le Moal
by this patch. Signed-off-by: Damien Le Moal <damien.lem...@wdc.com> Reviewed-by: Bart Van Assche <bart.vanass...@wdc.com> Reviewed-by: Johannes Thumshirn <jthumsh...@suse.de> Reviewed-by: Christoph Hellwig <h...@lst.de> --- drivers/scsi/sd_zbc.c | 24 --

Re: [PATCH V3 05/12] scsi: sd_zbc: Fix comments and indentation

2017-09-15 Thread Damien Le Moal
On 9/15/17 19:44, Hannes Reinecke wrote: > On 09/15/2017 12:06 PM, Damien Le Moal wrote: >> Fix comments style (do not use documented comment style) and add some >> comments to clarify some functions. Also fix some functions signature >> indentation and remove

Re: [PATCH V3 01/12] block: Fix declaration of blk-mq debugfs functions

2017-09-15 Thread Damien Le Moal
On 9/16/17 02:45, Christoph Hellwig wrote: > On Fri, Sep 15, 2017 at 07:06:34PM +0900, Damien Le Moal wrote: >> __blk_mq_debugfs_rq_show() and blk_mq_debugfs_rq_show() are exported >> symbols but ar eonly declared in the block internal file >> block/blk-mq-debugfs.h.

Re: [PATCH V3 06/12] scsi: sd_zbc: Rearrange code

2017-09-15 Thread Damien Le Moal
On 9/16/17 06:02, Bart Van Assche wrote: > On Fri, 2017-09-15 at 19:51 +0200, h...@lst.de wrote: >> On Fri, Sep 15, 2017 at 02:51:03PM +, Bart Van Assche wrote: >>> On Fri, 2017-09-15 at 19:06 +0900, Damien Le Moal wrote: >>>> Rearrange sd_zbc_setup() to include u

[PATCH V3 12/12] block: Introduce zoned I/O scheduler

2017-09-15 Thread Damien Le Moal
. AHCI). Signed-off-by: Damien Le Moal <damien.lem...@wdc.com> --- Documentation/block/zoned-iosched.txt | 48 ++ block/Kconfig.iosched | 12 + block/Makefile| 1 + block/zoned-iosched.c | 925 ++ 4

[PATCH V3 11/12] scsi: sd_zbc: Disable zone write locking with scsi-mq

2017-09-15 Thread Damien Le Moal
-by: Damien Le Moal <damien.lem...@wdc.com> Reviewed-by: Bart Van Assche <bart.vanass...@wdc.com> Reviewed-by: Johannes Thumshirn <jthumsh...@suse.de> --- drivers/scsi/sd_zbc.c | 9 +++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/drivers/scsi/sd_zbc.c b/drivers/s

[PATCH V3 10/12] scsi: sd_zbc: Limit zone write locking to sequential zones

2017-09-15 Thread Damien Le Moal
to be issued to conventional zones, locking only sequential zones. Signed-off-by: Damien Le Moal <damien.lem...@wdc.com> --- drivers/scsi/sd_zbc.c | 20 1 file changed, 12 insertions(+), 8 deletions(-) diff --git a/drivers/scsi/sd_zbc.c b/drivers/scsi/sd_zbc.c index 534e74

[PATCH V3 09/12] scsi: sd_zbc: Initialize device queue zoned structure

2017-09-15 Thread Damien Le Moal
for the disk capacity and number of zones to stabilize on the second revalidation pass to allocate and initialize the bitmaps. Signed-off-by: Damien Le Moal <damien.lem...@wdc.com> --- drivers/scsi/sd_zbc.c | 119 +++--- 1 file changed, 114 insertions

[PATCH V3 08/12] scsi: sd_zbc: Fix sd_zbc_read_zoned_characteristics()

2017-09-15 Thread Damien Le Moal
er.kernel.org> Signed-off-by: Damien Le Moal <damien.lem...@wdc.com> Reviewed-by: Bart Van Assche <bart.vanass...@wdc.com> Reviewed-by: Johannes Thumshirn <jthumsh...@suse.de> --- drivers/scsi/sd_zbc.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/dr

[PATCH V3 07/12] scsi: sd_zbc: Use well defined macros

2017-09-15 Thread Damien Le Moal
instead of open coding, use the min() macro to calculate a report zones reply buffer length in sd_zbc_check_zone_size() and the round_up() macro for calculating the number of zones in sd_zbc_setup(). No functional change is introduced by this patch. Signed-off-by: Damien Le Moal <damien.

[PATCH V3 06/12] scsi: sd_zbc: Rearrange code

2017-09-15 Thread Damien Le Moal
Rearrange sd_zbc_setup() to include use_16_for_rw and use_10_for_rw assignments and move the calculation of sdkp->zone_shift together with the assignment of the verified zone_blocks value in sd_zbc_check_zone_size(). No functional change is introduced by this patch. Signed-off-by: Damien Le M

[PATCH V3 04/12] scsi: sd_zbc: Move ZBC declarations to scsi_proto.h

2017-09-15 Thread Damien Le Moal
by this patch. Signed-off-by: Damien Le Moal <damien.lem...@wdc.com> Reviewed-by: Bart Van Assche <bart.vanass...@wdc.com> Reviewed-by: Johannes Thumshirn <jthumsh...@suse.de> --- drivers/scsi/sd_zbc.c | 24 include/scsi

[PATCH V3 02/12] block: Fix declaration of blk-mq scheduler functions

2017-09-15 Thread Damien Le Moal
them available to block scheduler modules implemented outside of the block directory. Signed-off-by: Damien Le Moal <damien.lem...@wdc.com> Reviewed-by: Johannes Thumshirn <jthumsh...@suse.de> --- block/blk-mq-sched.h | 11 +++ include/linux/blk-mq-sched.h | 14 +

[PATCH V3 00/12] scsi-mq support for ZBC disks

2017-09-15 Thread Damien Le Moal
om drivers/scsi to block Changes from v1: * Addressed Bart's comments for the blk-mq patches (declarations files) * Split (former) patch 4 into multiple patches to facilitate review * Fixed scsi disk lookup from io scheduler by introducing scsi_disk_from_queue() Damien Le Moal (12): block: Fix d

[PATCH V3 05/12] scsi: sd_zbc: Fix comments and indentation

2017-09-15 Thread Damien Le Moal
Fix comments style (do not use documented comment style) and add some comments to clarify some functions. Also fix some functions signature indentation and remove a useless blank line in sd_zbc_read_zones(). No functional change is introduced by this patch. Signed-off-by: Damien Le Moal

[PATCH V3 03/12] block: Add zoned block device information to request queue

2017-09-15 Thread Damien Le Moal
in the inability to know the number of zones of the device. Define the structure blk_zoned and include it as the zoned field of a request queue to allow low level drivers to provide more information on the device. Signed-off-by: Damien Le Moal <damien.lem...@wdc.com> --- include/linux/blkdev.

[PATCH V3 01/12] block: Fix declaration of blk-mq debugfs functions

2017-09-15 Thread Damien Le Moal
-mq-debugfs.h file to make the declarations cleanly available to other modules. While at it, also move the definition of the blk_mq_debugfs_attr structure to allow scheduler modules outside of the block directory to define debugfs attributes. Signed-off-by: Damien Le Moal <damien.lem...@wdc.

Re: [PATCH V2 00/12] scsi-mq support for ZBC disks

2017-09-13 Thread Damien Le Moal
Christoph, On 9/14/17 05:17, Christoph Hellwig wrote: > On Tue, Sep 12, 2017 at 05:38:05PM +0900, Damien Le Moal wrote: >> struct blk_zoned { >> unsigned int nr_zones; >> unsigned long *seq_zones; >> }; >> >> struct request_queue { >

Re: [PATCH V2 10/12] scsi: sd_zbc: Disable zone write locking with scsi-mq

2017-09-12 Thread Damien Le Moal
since these are not actual writes. the ZBC/ZAC standards do not modify the behavior of flush/synchronize cache commands. But I will look into more detail at the PREFLUSH/POSTFLUSH mechanic and relation to write request ordering to make sure no corner cases are left ignored. Thanks for the comments. Best regards. -- Damien Le Moal, Western Digital

Re: [PATCH V2 00/12] scsi-mq support for ZBC disks

2017-09-12 Thread Damien Le Moal
Christoph, On 9/11/17 21:24, Christoph Hellwig wrote: > On Fri, Sep 08, 2017 at 09:12:12AM -0700, Damien Le Moal wrote: >> 1) The zone size and the number of zones of the device (for the bitmaps >> allocation and offset->zone number conversion). >> 2) Zone type for the

Re: [PATCH V2 10/12] scsi: sd_zbc: Disable zone write locking with scsi-mq

2017-09-12 Thread Damien Le Moal
Ming, On 9/10/17 14:10, Ming Lei wrote: > On Fri, Sep 08, 2017 at 09:53:53AM -0700, Damien Le Moal wrote: >> Ming, >> >> On 9/8/17 05:43, Ming Lei wrote: >>> Hi Damien, >>> >>> On Fri, Sep 08, 2017 at 01:16:38AM +0900, Damien Le Moal wrote: >&g

Re: [PATCH V2 11/12] scsi: sd: Introduce scsi_disk_from_queue()

2017-09-12 Thread Damien Le Moal
Ming, On 9/10/17 14:16, Ming Lei wrote: > On Fri, Sep 08, 2017 at 01:16:39AM +0900, Damien Le Moal wrote: >> Using scsi_device_from_queue(), return the scsi_disk structure >> associated with a request queue if the device is a disk. >> Export this function to make it

Re: [PATCH V2 10/12] scsi: sd_zbc: Disable zone write locking with scsi-mq

2017-09-08 Thread Damien Le Moal
Ming, On 9/8/17 05:43, Ming Lei wrote: > Hi Damien, > > On Fri, Sep 08, 2017 at 01:16:38AM +0900, Damien Le Moal wrote: >> In the case of a ZBC disk used with scsi-mq, zone write locking does >> not prevent write reordering in sequential zones. Unlike the legacy >>

Re: [PATCH V2 00/12] scsi-mq support for ZBC disks

2017-09-08 Thread Damien Le Moal
the info needed. > Except for that this looks like a fine approach to me. Thanks. -- Damien Le Moal, Western Digital Research

[PATCH V2 11/12] scsi: sd: Introduce scsi_disk_from_queue()

2017-09-07 Thread Damien Le Moal
Using scsi_device_from_queue(), return the scsi_disk structure associated with a request queue if the device is a disk. Export this function to make it available to modules. Signed-off-by: Damien Le Moal <damien.lem...@wdc.com> --- drivers/scsi/sd.c | 32 d

[PATCH V2 12/12] scsi: Introduce ZBC disk I/O scheduler

2017-09-07 Thread Damien Le Moal
level (e.g. AHCI). This zoned scheduler code is added under the drivers/scsi directory so that information managed using the scsi_disk structure can be directly referenced. Doing so, cluttering the block layer with device type specific code is avoided. Signed-off-by: Damien Le Moal <damien.

[PATCH V2 08/12] scsi: sd_zbc: Fix sd_zbc_read_zoned_characteristics()

2017-09-07 Thread Damien Le Moal
er.kernel.org> Signed-off-by: Damien Le Moal <damien.lem...@wdc.com> Reviewed-by: Bart Van Assche <bart.vanass...@wdc.com> --- drivers/scsi/sd_zbc.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/scsi/sd_zbc.c b/drivers/scsi/sd_zbc.c index 8a45d

[PATCH V2 09/12] scsi: sd_zbc: Limit zone write locking to sequential zones

2017-09-07 Thread Damien Le Moal
to allocate and initialize the bitmaps. Signed-off-by: Damien Le Moal <damien.lem...@wdc.com> Reviewed-by: Bart Van Assche <bart.vanass...@wdc.com> --- drivers/scsi/sd.h | 1 + drivers/scsi/sd_zbc.c | 108 -- drivers/scsi/sd

[PATCH V2 10/12] scsi: sd_zbc: Disable zone write locking with scsi-mq

2017-09-07 Thread Damien Le Moal
command may already be out of order. Disable zone write locking in sd_zbc_write_lock_zone() if the disk is used with scsi-mq. Write order guarantees can be provided by an adapted I/O scheduler. Signed-off-by: Damien Le Moal <damien.lem...@wdc.com> Reviewed-by: Bart Van Assche <bart.vanass..

[PATCH V2 07/12] scsi: sd_zbc.c: Use well defined macros

2017-09-07 Thread Damien Le Moal
instead of open coding, use the min() macro to calculate a report zones reply buffer length in sd_zbc_check_zone_size() and the round_up() macro for calculating the number of zones in sd_zbc_setup(). No functional change is introduced by this patch. Signed-off-by: Damien Le Moal <damien.

[PATCH V2 06/12] scsi: sd_zbc: Rearrange code

2017-09-07 Thread Damien Le Moal
lue in sd_zbc_check_zone_size(). No functional change is introduced by this patch. Signed-off-by: Damien Le Moal <damien.lem...@wdc.com> --- drivers/scsi/sd_zbc.c | 21 + drivers/scsi/sd_zbc.h | 17 + 2 files changed, 22 insertions(+), 16 deletions(-) diff --git a/dri

[PATCH V2 05/12] scsi: sd_zbc: Fix comments and indentation

2017-09-07 Thread Damien Le Moal
Fix comments style (do not use documented comment style) and add some comments to clarify some functions. Also fix some functions signature indentation and remove a useless blank line. No functional change is introduced by this patch. Signed-off-by: Damien Le Moal <damien.lem...@wdc.

[PATCH V2 03/12] scsi: sd_zbc: Move ZBC declarations to scsi_proto.h

2017-09-07 Thread Damien Le Moal
Move standard macro definitions for the zone types and zone conditions to scsi_proto.h together with the definitions related to the REPORT ZONES command. While at it, define all values in the enums to be clear. Signed-off-by: Damien Le Moal <damien.lem...@wdc.com> Reviewed-by: Bart Van

[PATCH V2 04/12] scsi: sd_zbc: Move zbc disk declarations to sd_zbc.h

2017-09-07 Thread Damien Le Moal
Introduce sd_zbc.h to gather ZBC disk related declarations and avoid cluttering sd.h. No functional change is introduced by this patch. Signed-off-by: Damien Le Moal <damien.lem...@wdc.com> --- drivers/scsi/sd.c | 1 + drivers/scsi/sd.h

[PATCH V2 02/12] block: Fix declaration of blk-mq scheduler functions

2017-09-07 Thread Damien Le Moal
them available to block scheduler modules implemented outside of the block directory. Signed-off-by: Damien Le Moal <damien.lem...@wdc.com> --- block/blk-mq-sched.h | 11 +++ include/linux/blk-mq-sched.h | 14 ++ 2 files changed, 17 insertions(+), 8 del

[PATCH V2 01/12] block: Fix declaration of blk-mq debugfs functions

2017-09-07 Thread Damien Le Moal
-mq-debugfs.h file to make the declarations cleanly available to other modules. While at it, also move the definition of the blk_mq_debugfs_attr structure to allow scheduler modules outside of the block directory to define debugfs attributes. Signed-off-by: Damien Le Moal <damien.lem...@wdc.

[PATCH V2 00/12] scsi-mq support for ZBC disks

2017-09-07 Thread Damien Le Moal
ate review * Fixed scsi disk lookup from io scheduler by introducing scsi_disk_from_queue() Damien Le Moal (12): block: Fix declaration of blk-mq debugfs functions block: Fix declaration of blk-mq scheduler functions scsi: sd_zbc: Move ZBC declarations to scsi_proto.h scsi: sd_zbc: Mov

[PATCH V3 2/2] scsi: sd: Use sectors_to_logical()

2017-09-05 Thread Damien Le Moal
Replace open coded conversions. Signed-off-by: Damien Le Moal <damien.lem...@wdc.com> --- drivers/scsi/sd.c | 16 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/drivers/scsi/sd.c b/drivers/scsi/sd.c index 0a824e9f4d63..c5d05b1c58a5 100644 --- a/drivers/scs

[PATCH V3 1/2] scsi: sd: Fix sd_config_write_same()

2017-09-05 Thread Damien Le Moal
disks. Signed-off-by: Damien Le Moal <damien.lem...@wdc.com> --- drivers/scsi/sd.c | 20 1 file changed, 20 insertions(+) diff --git a/drivers/scsi/sd.c b/drivers/scsi/sd.c index e2647f2d4430..0a824e9f4d63 100644 --- a/drivers/scsi/sd.c +++ b/drivers/scsi/sd.c @@ -898,6 +

[PATCH V3 0/2] sd fixes and cleanup

2017-09-05 Thread Damien Le Moal
change in first patch. *** BLURB HERE *** Damien Le Moal (2): scsi: sd: Fix sd_config_write_same() scsi: sd: Use sectors_to_logical() drivers/scsi/sd.c | 36 1 file changed, 28 insertions(+), 8 deletions(-) -- 2.13.5

[PATCH 8/8] scsi: Introduce ZBC disk I/O scheduler

2017-09-01 Thread Damien Le Moal
level (e.g. AHCI). This zoned scheduler code is added under the drivers/scsi directory so that information managed using the scsi_disk structure can be directly referenced. Doing so, cluttering the block layer with device type specific code is avoided. Signed-off-by: Damien Le Moal <damien.

[PATCH 6/8] scsi: sd_zbc: Limit zone write locking to sequential zones

2017-09-01 Thread Damien Le Moal
to allocate and initialize the bitmaps. Signed-off-by: Damien Le Moal <damien.lem...@wdc.com> --- drivers/scsi/sd.h | 1 + drivers/scsi/sd_zbc.c | 113 ++ drivers/scsi/sd_zbc.h | 9 3 files changed, 106 insertions(+), 17 del

[PATCH 3/8] scsi: sd_zbc: Move ZBC declarations to scsi_proto.h

2017-09-01 Thread Damien Le Moal
Move standard macro definitions for the zone types and zone conditions to scsi_proto.h together with the definitions related to the REPORT ZONES command. While at it, define all values in the enums to be clear. Signed-off-by: Damien Le Moal <damien.lem...@wdc.com> --- drivers/scsi/sd

[PATCH 7/8] scsi: sd_zbc: Disable zone write locking with scsi-mq

2017-09-01 Thread Damien Le Moal
command may already be out of order. Disable zone write locking in sd_zbc_write_lock_zone() if the disk is used with scsi-mq. Write order guarantees can be provided by an adapted I/O scheduler. Signed-off-by: Damien Le Moal <damien.lem...@wdc.com> --- drivers/scsi/sd_zbc.c | 4 1 file chan

<    1   2   3   4   >