[PATCH v2] block: update documentation

2018-11-29 Thread Damien Le Moal
of the io_poll_delay attribute. nr_zones description is also added to ABI/testing/sysfs-block and contact email address updated for the zoned attribute. Signed-off-by: Damien Le Moal --- Documentation/ABI/testing/sysfs-block | 12 +-- Documentation/block/queue-sysfs.txt | 29

Re: [PATCH] block: update documentation

2018-11-29 Thread Damien Le Moal
e smaller. >> + > > For the part that says, "...chunk_sectors indicates the size of 512B > sectors of the zones of the device", should it be this instead? > > "...chunk_sectors indicates the size in 512B sectors of the zones of the > device" Indeed better. Will send an update. Thanks ! -- Damien Le Moal Western Digital Research

Re: [PATCH] block: update documentation

2018-11-28 Thread Damien Le Moal
On 2018/11/28 18:55, Johannes Thumshirn wrote: > On 28/11/2018 02:25, Damien Le Moal wrote: >> Jens Axboe , February 2009 > > I guess that address of Jens' doesn't work anymore either. > Yes, I guess. I only updated my own email address... -- Damien Le Moal Western Digital Research

[PATCH] block: update documentation

2018-11-27 Thread Damien Le Moal
attribute. nr_zones description is also added to ABI/testing/sysfs-block and contyact email address updated for the zoned attribute. Signed-off-by: Damien Le Moal --- Documentation/ABI/testing/sysfs-block | 10 - Documentation/block/queue-sysfs.txt | 29 ++- 2

Re: [PATCH 2/7] block: Remove bio->bi_ioc

2018-11-20 Thread Damien Le Moal
On 2018/11/21 11:49, Jens Axboe wrote: > On 11/20/18 7:45 PM, Damien Le Moal wrote: >> On 2018/11/21 11:11, Jens Axboe wrote: >>> On 11/20/18 4:58 PM, Damien Le Moal wrote: >>>> On 2018/11/21 2:31, Jens Axboe wrote: >>>>> I think the below should fix

Re: [PATCH 2/7] block: Remove bio->bi_ioc

2018-11-20 Thread Damien Le Moal
On 2018/11/21 11:11, Jens Axboe wrote: > On 11/20/18 4:58 PM, Damien Le Moal wrote: >> On 2018/11/21 2:31, Jens Axboe wrote: >>> I think the below should fix it, we haven't necessarily setup an >>> ioc if we're just doing as passthrough request. >>> >>

Re: [PATCH 2/7] block: Remove bio->bi_ioc

2018-11-20 Thread Damien Le Moal
On 2018/11/21 11:11, Jens Axboe wrote: > On 11/20/18 4:58 PM, Damien Le Moal wrote: >> On 2018/11/21 2:31, Jens Axboe wrote: >>> I think the below should fix it, we haven't necessarily setup an >>> ioc if we're just doing as passthrough request. >>> >>

Re: [PATCH 2/7] block: Remove bio->bi_ioc

2018-11-20 Thread Damien Le Moal
On 2018/11/21 10:24, Ming Lei wrote: > On Tue, Nov 20, 2018 at 11:58:09PM +0000, Damien Le Moal wrote: >> On 2018/11/21 2:31, Jens Axboe wrote: >>> I think the below should fix it, we haven't necessarily setup an >>> ioc if we're just doing as passthrough request. >

Re: [PATCH 2/7] block: Remove bio->bi_ioc

2018-11-20 Thread Damien Le Moal
eturn;" in blk_mq_sched_assign_ioc() before the patch. Any idea why this is popping up now ? Ming, Is this a new test your are running ? If this same problem triggers on stable kernels, Jens patch needs to go to stable too. Best regards. -- Damien Le Moal Western Digital Research

[PATCH v2 5/6] block: prevent merging of requests with different priorities

2018-11-19 Thread Damien Le Moal
I/O priorities to fix this. Signed-off-by: Damien Le Moal --- block/blk-core.c | 3 --- block/blk-merge.c | 8 ++-- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/block/blk-core.c b/block/blk-core.c index 4450d3c08f25..dde30b08aa14 100644 --- a/block/blk-core.c +++ b/block

[PATCH v2 1/6] aio: Comment use of IOCB_FLAG_IOPRIO aio flag

2018-11-19 Thread Damien Le Moal
Comment the use of the IOCB_FLAG_IOPRIO aio flag similarly to the IOCB_FLAG_RESFD flag. Reviewed-by: Christoph Hellwig Reviewed-by: Johannes Thumshirn Signed-off-by: Damien Le Moal --- include/uapi/linux/aio_abi.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/include/uapi/linux

[PATCH v2 0/6] Improve I/O priority handling

2018-11-19 Thread Damien Le Moal
* Dropped get_task_ioprio() change patch Damien Le Moal (6): aio: Comment use of IOCB_FLAG_IOPRIO aio flag block: Remove bio->bi_ioc block: Introduce get_current_ioprio() aio: Fix fallback I/O priority value block: prevent merging of requests with different priorities block: Initial

[PATCH v2 6/6] block: Initialize BIO I/O priority early

2018-11-19 Thread Damien Le Moal
path, blk_init_request_from_bio() can be simplified. Reviewed-by: Christoph Hellwig Reviewed-by: Adam Manzanares Signed-off-by: Damien Le Moal --- block/blk-core.c | 5 + include/linux/fs.h | 2 +- 2 files changed, 2 insertions(+), 5 deletions(-) diff --git a/block/blk-core.c b/block/blk

[PATCH v2 3/6] block: Introduce get_current_ioprio()

2018-11-19 Thread Damien Le Moal
Define get_current_ioprio() as an inline helper to obtain the caller I/O priority from its task I/O context. Use this helper in blk_init_request_from_bio() to set a request ioprio. Reviewed-by: Christoph Hellwig Reviewed-by: Johannes Thumshirn Signed-off-by: Damien Le Moal --- block/blk

[PATCH v2 2/6] block: Remove bio->bi_ioc

2018-11-19 Thread Damien Le Moal
adable by also removing this helper, which also allows to simplify blk_mq_sched_assign_ioc() by removing its bio argument. Reviewed-by: Christoph Hellwig Reviewed-by: Johannes Thumshirn Reviewed-by: Adam Manzanares Signed-off-by: Damien Le Moal --- block/bio.c | 4 blo

[PATCH v2 4/6] aio: Fix fallback I/O priority value

2018-11-19 Thread Damien Le Moal
-by: Adam Manzanares Signed-off-by: Damien Le Moal --- fs/aio.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fs/aio.c b/fs/aio.c index 301e6314183b..b984918be4b7 100644 --- a/fs/aio.c +++ b/fs/aio.c @@ -1441,7 +1441,7 @@ static int aio_prep_rw(struct kiocb *req, struct iocb

Re: [PATCH 3/7] block: Fix get_task_ioprio() default return value

2018-11-19 Thread Damien Le Moal
On Mon, 2018-11-19 at 00:16 -0800, Christoph Hellwig wrote: > On Mon, Nov 19, 2018 at 12:51:27PM +0900, Damien Le Moal wrote: > > As explained in ioprio_get() and ionice man pages, the default I/O > > priority class for processes which have not set an I/O priority > >

Re: [PATCH 4/7] block: Introduce get_current_ioprio()

2018-11-19 Thread Damien Le Moal
Adam, On 2018/11/20 3:18, Adam Manzanares wrote: > On Mon, 2018-11-19 at 12:51 +0900, Damien Le Moal wrote: >> Define get_current_ioprio() as an inline helper to obtain the caller >> I/O priority from its task I/O context. Use this helper in >> blk_init_request_from_bio() to

[PATCH 3/7] block: Fix get_task_ioprio() default return value

2018-11-18 Thread Damien Le Moal
As explained in ioprio_get() and ionice man pages, the default I/O priority class for processes which have not set an I/O priority using ioprio_set() is IOPRIO_CLASS_BE and not IOPRIO_CLASS_NONE. Signed-off-by: Damien Le Moal --- block/ioprio.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion

[PATCH 7/7] block: Initialize BIO I/O priority early

2018-11-18 Thread Damien Le Moal
path, blk_init_request_from_bio() can be simplified. Signed-off-by: Damien Le Moal --- block/blk-core.c | 5 + include/linux/fs.h | 2 +- 2 files changed, 2 insertions(+), 5 deletions(-) diff --git a/block/blk-core.c b/block/blk-core.c index dde30b08aa14..04f5be473638 100644 --- a/block

[PATCH 2/7] block: Remove bio->bi_ioc

2018-11-18 Thread Damien Le Moal
adable by also removing this helper, which also allows to simplify blk_mq_sched_assign_ioc() by removing its bio argument. Signed-off-by: Damien Le Moal --- block/bio.c | 4 block/blk-core.c | 2 +- block/blk-mq-sched.c | 4 ++-- block/blk-mq-sched.h

[PATCH 4/7] block: Introduce get_current_ioprio()

2018-11-18 Thread Damien Le Moal
Define get_current_ioprio() as an inline helper to obtain the caller I/O priority from its task I/O context. Use this helper in blk_init_request_from_bio() to set a request ioprio. Signed-off-by: Damien Le Moal --- block/blk-core.c | 6 +- include/linux/ioprio.h | 13 + 2

[PATCH 5/7] aio: Fix fallback I/O priority value

2018-11-18 Thread Damien Le Moal
For cases when the application does not specify aio_reqprio for an aio, fallback to use get_current_ioprio() to obtain the task I/O priority last set using ioprio_set() rather than the hardcoded IOPRIO_CLASS_NONE value. Signed-off-by: Damien Le Moal --- fs/aio.c | 2 +- 1 file changed, 1

[PATCH 0/7] Improve I/O priority handling

2018-11-18 Thread Damien Le Moal
but can result in userland applications behavior change since a different I/O priority values will be returned for processes that have *not* executed ioprio_set(). This needs careful review. Damien Le Moal (7): aio: Comment use of IOCB_FLAG_IOPRIO aio flag block: Remove bio->bi_ioc block:

[PATCH 6/7] block: prevent merging of requests with different priorities

2018-11-18 Thread Damien Le Moal
I/O priorities to fix this. Signed-off-by: Damien Le Moal --- block/blk-core.c | 3 --- block/blk-merge.c | 14 -- 2 files changed, 12 insertions(+), 5 deletions(-) diff --git a/block/blk-core.c b/block/blk-core.c index 4450d3c08f25..dde30b08aa14 100644 --- a/block/blk-core.c +++ b

[PATCH 1/7] aio: Comment use of IOCB_FLAG_IOPRIO aio flag

2018-11-18 Thread Damien Le Moal
Comment the use of the IOCB_FLAG_IOPRIO aio flag similarly to the IOCB_FLAG_RESFD flag. Signed-off-by: Damien Le Moal --- include/uapi/linux/aio_abi.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/include/uapi/linux/aio_abi.h b/include/uapi/linux/aio_abi.h index ce43d340f010

Re: [PATCH v2] null_blk: Add conventional zone configuration for zoned support

2018-10-30 Thread Damien Le Moal
host-managed zoned block devices must always have at least one > sequential zone, if the value of zone_nr_conv is larger than or equal to > the total number of zones of the device nr_zones, zone_nr_conv is > automatically changed to nr_zones - 1. Looks good. Reviewed-by: Damien Le Moal

Re: [PATCH] null_blk: Add conventional zone configuration for zoned support

2018-10-29 Thread Damien Le Moal
host-managed zoned block devices must always have at least one > sequential > zone, if the value of nr_conv_zones is larger than or equal to the total > number > of zones of the device nr_zones, nr_conv_zones is automatically changed to > nr_zones - 1. > Looks good. Reviewed-by:

[PATCH v3] block: fix deadline elevator drain for zoned block devices

2018-09-26 Thread Damien Le Moal
drain without extensive modifications to the deadline code itself to handle forced-dispatch calls. Signed-off-by: Damien Le Moal Fixes: 8dc8146f9c92 ("deadline-iosched: Introduce zone locking support") Cc: sta...@vger.kernel.org --- Changes from v2: * Move zoned block device test befor

[PATCH v2] block: fix deadline elevator drain for zoned block devices

2018-09-26 Thread Damien Le Moal
drain without extensive modifications to the deadline code itself to handle forced-dispatch calls. Signed-off-by: Damien Le Moal Reviewed-by: Johannes Thumshirn --- Changes from v1: * Fixed typo in commit message block/elevator.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git

[PATCH] block: fix deadline elevator drain for zoned block devices

2018-09-26 Thread Damien Le Moal
without extensive modifications to the deadline code itself to handle forced-dispatch calls. Signed-off-by: Damien Le Moal --- block/elevator.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/block/elevator.c b/block/elevator.c index 6a06b5d040e5..8cd81fd6339a 100644

Re: dm-zoned-tools: add zoned disk udev rules for scheduler / dmsetup

2018-06-15 Thread Damien Le Moal
ut we can't leave users hanging as well. Let's at >> least come up with a plan which we seem to agree on and document that. > > Best to try to get Damien and others more invested in zoned devices to > help you take up your cause. I think it is worthwhile to develop a > strategy. But it needs to be done in terms of the norms of the existing > infrastructure we all make use of today. So first step is making > existing tools zoned device aware (even if to reject such devices). Rest assured that I am fully invested in improving the existing infrastructure for zoned block devices. As mentioned above, applications based use of zoned block devices still prevails today. So I do tend to work more on that side of things (libzbc, tcmu, sysutils for instance) rather than on a better integration with more advanced tools (such as LVM) relying on kernel features. I am however seeing rising interest in file systems and also in dm-zoned. So definitely it is time to step up work in that area to further simplify using these drives. Thank you for the feedback. Best regards. -- Damien Le Moal, Western Digital

Re: dm-zoned-tools: add zoned disk udev rules for scheduler / dmsetup

2018-06-15 Thread Damien Le Moal
nce. > So a heartfelt: > > Nacked-by: Mike Snitzer Understood. I will revert and not document this udev rule in dm-zoned-tools. I was a little too quick in applying this patch and did not wait to see comments first. My bad. Thank you for your comments. Best regards. -- Damien Le Moal, Western Digital

Re: [PATCH] dm-zoned-tools: add zoned disk udev rules for scheduler / dmsetup

2018-06-14 Thread Damien Le Moal
# > +# To figure out which dm-$number it is, use dmsetup info, the minor number > +# is the $number. > +# > +# 5) Add an etry in /etc/fstab with nofail for example: > +# > +# UUID=---c1234bbb33456 /media/monster xfs nofail 0 0 > +# > +# nofail will ensure system boots fine even if you boot into a kernel which > +# lacks support for the device and so it is not found. Since the UUID will > +# always match the device we don't care if the device moves around the bus > +# on the system. We just need to get the UUID once. > + > +LABEL="zone_disk_group_end" Applied. Thanks Luis ! -- Damien Le Moal, Western Digital

Re: [PATCH 0/2][RFC] block: default to deadline for SMR devices

2018-05-30 Thread Damien Le Moal
Christoph, On 5/30/18 17:47, Christoph Hellwig wrote: > On Wed, May 30, 2018 at 06:22:04AM +0000, Damien Le Moal wrote: >> That would necessitate splitting elevator_init() into a generic elevator >> initialization function setting up the elevator related fields of the &

Re: [PATCH 0/2][RFC] block: default to deadline for SMR devices

2018-05-30 Thread Damien Le Moal
set. For applications not relying on these components and doing raw disk I/Os, I see 2 camps in the field: the sg/bsg camp and the regular POSIX system calls camp. For the former, since the kernel will have minimal interaction with the commands, the application is on its own. Control over write ordering has to be coded in. But for the latter case, which is orders of magnitudes easier to use, the scheduler needs to be set correctly or the same pressure is on the application to "do the right thing". This conflicts with the benefits of this access path choice (simplicity). In the end, if the drives are used directly from applications, I think it is OK to only expect a correct system setting if deadline is required. So udev is fine. But for the kernel components like dm-zoned, a sane default being set from the start is my preferred choice. Best regards. -- Damien Le Moal, Western Digital

Re: [PATCH 0/2][RFC] block: default to deadline for SMR devices

2018-05-30 Thread Damien Le Moal
sure who else to > include. > > FYI, below is the udev rule Damien had provided to Bryan. I'm not sure > about the KERNEL=="sd[a-z]" bit, that may need modification. Note: I'm > no udev expert. It probably needs to be something like KERNEL=="sd*" to allow more than 26 drives. Best regards. > > Cheers, > Jeff > > ACTION=="add|change", KERNEL=="sd[a-z]", > ATTRS{queue/zoned}=="host-managed", ATTR{queue/scheduler}="deadline" > -- Damien Le Moal, Western Digital

Re: [PATCH 0/2][RFC] block: default to deadline for SMR devices

2018-05-30 Thread Damien Le Moal
seems like a trivial issue that should have been caught > in basic testing, I would not trust that drive with any data if it > bricks that easily. I think that the bug in this particular case was with the BIOS (probably UEFI), not the disk. Disks only answer to trivial requests when probed on boot, unless the BIOS is too smart for its own good and doing very weird things. Different issue anyway, not related to the kernel. Best regards. -- Damien Le Moal, Western Digital

Re: [PATCH] blkdev_report_zones_ioctl(): Use vmalloc() to allocate large buffers

2018-05-23 Thread Damien Le Moal
ls") > Signed-off-by: Bart Van Assche <bart.vanass...@wdc.com> > Cc: Shaun Tancheff <shaun.tanch...@seagate.com> > Cc: Damien Le Moal <damien.lem...@hgst.com> > Cc: Christoph Hellwig <h...@lst.de> > Cc: Martin K. Petersen <martin.peter...@oracle.com> &g

Re: [PATCH dm-zoned-tools 2/2] README: fix example script

2018-04-30 Thread Damien Le Moal
"0 `blockdev --getsize ${dev}` dm-zoned ${dev} ${options}" | \ > +echo "0 `blockdev --getsize ${dev}` zoned ${dev} ${options}" | \ > dmsetup create zoned-`basename ${dev}` > ]] Yes, indeed... Reviewed-by: Damien Le Moal <damien.lem...@wdc.com> -- Damien Le Moal Western Digital Research

Re: [PATCH dm-zoned-tools 1/2] README: fix small typo host-manmaged --> host-managed

2018-04-30 Thread Damien Le Moal
head). For a 10TB host-manmaged disk with 256 MB > zones, > +memory and storage overhead). For a 10TB host-managed disk with 256 MB zones, > dm-zoned memory usage per disk instance is at most 4.5 MB and as little as 5 > zones will be used internally for storing metadata and performai

Re: [PATCH] block: Avoid executing a report or reset zones while a queue is frozen

2018-04-17 Thread Damien Le Moal
e BIO issuing side, the calls to blk_queue_enter() ensures the same. This all allows to leave unmodified all the blk-zoned.c helper functions that use the request queue information (bitmaps and number of zones), without any need for rcu lock calls. I think this is a simpler approach. Best regards. -- Damien Le Moal Western Digital Research

Re: [PATCH] blk-mq: Make sure that the affected zone is unlocked if a request times out

2018-02-27 Thread Damien Le Moal
is patch, if a request times out >> the zone that request applies to remains locked forever and no further >> writes are accepted for that zone. >> >> Fixes: 5700f69178e9 ("mq-deadline: Introduce zone locking support") >> Signed-off-by: Damien Le Moal <dami

Re: [PATCH 2/2] blk-mq-debugfs: Show zone locking information

2018-02-27 Thread Damien Le Moal
; > Signed-off-by: Bart Van Assche <bart.vanass...@wdc.com> > Cc: Omar Sandoval <osan...@fb.com> > Cc: Damien Le Moal <damien.lem...@wdc.com> > Cc: Ming Lei <ming@redhat.com> > Cc: Hannes Reinecke <h...@suse.de> > Cc: Johannes Thumshirn <jthumsh...

[PATCH V9 3/7] mq-deadline: Introduce zone locking support

2017-12-20 Thread Damien Le Moal
-by: Damien Le Moal <damien.lem...@wdc.com> Reviewed-by: Christoph Hellwig <h...@lst.de> Reviewed-by: Martin K. Petersen <martin.peter...@oracle.com> --- block/mq-deadline.c | 89 +++-- 1 file changed, 86 insertions(+), 3 deletions(-)

[PATCH V9 4/7] deadline-iosched: Introduce dispatch helpers

2017-12-20 Thread Damien Le Moal
forward declaration of the function deadline_move_request(). Signed-off-by: Damien Le Moal <damien.lem...@wdc.com> Reviewed-by: Christoph Hellwig <h...@lst.de> Reviewed-by: Martin K. Petersen <martin.peter...@oracle.com> --- block/deadl

[PATCH V9 7/7] sd: Remove zone write locking

2017-12-20 Thread Damien Le Moal
The block layer now handles zone write locking. Signed-off-by: Damien Le Moal <damien.lem...@wdc.com> Reviewed-by: Christoph Hellwig <h...@lst.de> Reviewed-by: Martin K. Petersen <martin.peter...@oracle.com> --- drivers/scsi/sd.c| 41 +++-

[PATCH V9 6/7] sd_zbc: Initialize device request queue zoned data

2017-12-20 Thread Damien Le Moal
capacity (number of zones) changes. Signed-off-by: Damien Le Moal <damien.lem...@wdc.com> --- drivers/scsi/sd_zbc.c | 152 +++--- 1 file changed, 144 insertions(+), 8 deletions(-) diff --git a/drivers/scsi/sd_zbc.c b/drivers/scsi/sd_zbc.c

[PATCH V9 5/7] deadline-iosched: Introduce zone locking support

2017-12-20 Thread Damien Le Moal
-by: Damien Le Moal <damien.lem...@wdc.com> Reviewed-by: Christoph Hellwig <h...@lst.de> Reviewed-by: Martin K. Petersen <martin.peter...@oracle.com> --- block/deadline-iosched.c | 71 ++-- 1 file changed, 68 insertions(+), 3 deletions(-)

[PATCH V9 2/7] mq-deadline: Introduce dispatch helpers

2017-12-20 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() for zoned block devices. Signed-off-by: Damien Le Moal <damien.

[PATCH V9 1/7] block: introduce zoned block devices zone write locking

2017-12-20 Thread Damien Le Moal
dering by limiting to at most a single write request per zone outside of the scheduler at any time. Based on previous patches from Damien Le Moal. Signed-off-by: Christoph Hellwig <h...@lst.de> [Damien] * Fixed comments and identation in blkdev.h * Changed helper functions * Fixed this commit messag

[PATCH V9 0/7] blk-mq support for ZBC disks

2017-12-20 Thread Damien Le Moal
y introducing scsi_disk_from_queue() Christoph Hellwig (1): block: introduce zoned block devices zone write locking Damien Le Moal (6): mq-deadline: Introduce dispatch helpers mq-deadline: Introduce zone locking support deadline-iosched: Introduce dispatch helpers deadline-iosched: Introduc

Re: [PATCH V8 0/7] blk-mq support for ZBC disks

2017-12-11 Thread Damien Le Moal
Jens, On Fri, 2017-11-24 at 16:54 -0700, Jens Axboe wrote: > On 11/24/2017 04:48 PM, Damien Le Moal wrote: > > [Full quote deleted] > > > > Hi Jens, > > > > Any comment regarding this series ? > > I understand that this would be for the 4.16 merge wi

Re: [PATCH V8 0/7] blk-mq support for ZBC disks

2017-11-24 Thread Damien Le Moal
. -- Damien Le Moal Western Digital Research

[PATCH V8 2/7] mq-deadline: Introduce dispatch helpers

2017-11-08 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() for zoned block devices. Signed-off-by: Damien Le Moal <damien.

[PATCH V8 6/7] sd_zbc: Initialize device request queue zoned data

2017-11-08 Thread Damien Le Moal
capacity (number of zones) changes. Signed-off-by: Damien Le Moal <damien.lem...@wdc.com> --- drivers/scsi/sd_zbc.c | 152 +++--- 1 file changed, 144 insertions(+), 8 deletions(-) diff --git a/drivers/scsi/sd_zbc.c b/drivers/scsi/sd_zbc.c

[PATCH V8 1/7] block: introduce zoned block devices zone write locking

2017-11-08 Thread Damien Le Moal
dering by limiting to at most a single write request per zone outside of the scheduler at any time. Based on previous patches from Damien Le Moal. Signed-off-by: Christoph Hellwig <h...@lst.de> [Damien] * Fixed comments and identation in blkdev.h * Changed helper functions * Fixed this commit messag

[PATCH V8 5/7] deadline-iosched: Introduce zone locking support

2017-11-08 Thread Damien Le Moal
-by: Damien Le Moal <damien.lem...@wdc.com> Reviewed-by: Christoph Hellwig <h...@lst.de> Reviewed-by: Martin K. Petersen <martin.peter...@oracle.com> --- block/deadline-iosched.c | 71 ++-- 1 file changed, 68 insertions(+), 3 deletions(-)

[PATCH V8 7/7] sd: Remove zone write locking

2017-11-08 Thread Damien Le Moal
The block layer now handles zone write locking. Signed-off-by: Damien Le Moal <damien.lem...@wdc.com> Reviewed-by: Christoph Hellwig <h...@lst.de> Reviewed-by: Martin K. Petersen <martin.peter...@oracle.com> --- drivers/scsi/sd.c| 41 +++-

[PATCH V8 4/7] deadline-iosched: Introduce dispatch helpers

2017-11-08 Thread Damien Le Moal
forward declaration of the function deadline_move_request(). Signed-off-by: Damien Le Moal <damien.lem...@wdc.com> Reviewed-by: Christoph Hellwig <h...@lst.de> Reviewed-by: Martin K. Petersen <martin.peter...@oracle.com> --- block/deadl

[PATCH V8 3/7] mq-deadline: Introduce zone locking support

2017-11-08 Thread Damien Le Moal
-by: Damien Le Moal <damien.lem...@wdc.com> Reviewed-by: Christoph Hellwig <h...@lst.de> Reviewed-by: Martin K. Petersen <martin.peter...@oracle.com> --- block/mq-deadline.c | 89 +++-- 1 file changed, 86 insertions(+), 3 deletions(-)

Re: [PATCH V7 6/8] scsi: sd_zbc: Initialize device request queue zoned data

2017-11-08 Thread Damien Le Moal
fter the first report zones... In any case, as you suggested, patch 8 should be merged with this one. I will fix that and post a v8. Thank you for the review. -- Damien Le Moal, Western Digital

[PATCH V7 6/8] scsi: sd_zbc: Initialize device request queue zoned data

2017-11-08 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 V7 1/8] block: introduce zoned block devices zone write locking

2017-11-08 Thread Damien Le Moal
dering by limiting to at most a single write request per zone outside of the scheduler at any time. Based on previous patches from Damien Le Moal. Signed-off-by: Christoph Hellwig <h...@lst.de> [Damien] * Fixed comments and identation in blkdev.h * Changed helper functions * Fixed this commit messag

[PATCH V7 8/8] scsi: sd_zbc: Fix zone information initialization

2017-11-08 Thread Damien Le Moal
Make sure that the device request queue zone information (number of zones and zone bitmaps) are reinitialized if the number of zones changes (e.g. on a drive capacity change on revalidate). Signed-off-by: Damien Le Moal <damien.lem...@wdc.com> --- drivers/scsi/sd_zbc.

[PATCH V7 7/8] scsi: sd: Remove zone write locking

2017-11-08 Thread Damien Le Moal
The block layer now handles zone write locking. Signed-off-by: Damien Le Moal <damien.lem...@wdc.com> --- drivers/scsi/sd.c| 41 +++--- drivers/scsi/sd.h| 11 - drivers/scsi/sd_zbc.c| 105 +++ includ

[PATCH V7 2/8] blokc: mq-deadline: Introduce dispatch helpers

2017-11-08 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() for zoned block devices. Signed-off-by: Damien Le Moal <damien.

[PATCH V7 0/8] blk-mq support for ZBC disks

2017-11-08 Thread Damien Le Moal
cilitate review * Fixed scsi disk lookup from io scheduler by introducing scsi_disk_from_queue() Christoph Hellwig (1): block: introduce zoned block devices zone write locking Damien Le Moal (7): blokc: mq-deadline: Introduce dispatch helpers block: mq-deadline: Introduce zone locking suppor

[PATCH V7 4/8] block: deadline-iosched: Introduce dispatch helpers

2017-11-08 Thread Damien Le Moal
forward declaration of the function deadline_move_request(). Signed-off-by: Damien Le Moal <damien.lem...@wdc.com> --- block/deadline-iosched.c | 47 +-- 1 file changed, 37 insertions(+), 10 deletions(-) diff --git a/block/deadline-iosched.c b

[PATCH V7 3/8] block: mq-deadline: Introduce zone locking support

2017-11-08 Thread Damien Le Moal
-by: Damien Le Moal <damien.lem...@wdc.com> --- block/mq-deadline.c | 89 +++-- 1 file changed, 86 insertions(+), 3 deletions(-) diff --git a/block/mq-deadline.c b/block/mq-deadline.c index 8bd6db9e69c7..d56972e8ebda 100644 --- a/block/mq-dead

[PATCH V7 5/8] block: deadline-iosched: Introduce zone locking support

2017-11-08 Thread Damien Le Moal
-by: Damien Le Moal <damien.lem...@wdc.com> --- block/deadline-iosched.c | 71 ++-- 1 file changed, 68 insertions(+), 3 deletions(-) diff --git a/block/deadline-iosched.c b/block/deadline-iosched.c index 81e3f0897457..9de9f156e203 100644 --- a/block/de

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

2017-10-02 Thread Damien Le Moal
Bart, On 10/3/17 08:44, Bart Van Assche wrote: > On Mon, 2017-10-02 at 16:15 +0900, Damien Le Moal wrote: >> When dispatching write requests to a zoned block device, only allow >> requests targeting an unlocked zone. Requests targeting a locked zone >> are left in the schedu

[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 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

[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 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 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 12/14] block: mq-deadline: Introduce zone locking support

2017-10-02 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 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 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 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 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 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 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 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 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 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

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 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 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 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 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 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 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 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 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

  1   2   3   >