From: Jens Axboe <axboe@kernel.dk>
To: Damien Le Moal <damien.lemoal@wdc.com>
Cc: linux-scsi@vger.kernel.org,
"Martin K . Petersen" <martin.petersen@oracle.com>,
linux-block@vger.kernel.org, Christoph Hellwig <hch@lst.de>,
Bart Van Assche <Bart.VanAssche@wdc.com>
Subject: Re: [PATCH V9 0/7] blk-mq support for ZBC disks
Date: Fri, 5 Jan 2018 09:21:52 -0700 [thread overview]
Message-ID: <20180105162150.GA16978@kernel.dk> (raw)
In-Reply-To: <20171221064344.6228-1-damien.lemoal@wdc.com>
On Thu, Dec 21 2017, Damien Le Moal wrote:
> This series, formerly titled "scsi-mq support for ZBC disks", implements
> support for ZBC disks for system using the scsi-mq I/O path.
>
> The current scsi level support of ZBC disks guarantees write request ordering
> using a per-zone write lock which prevents issuing simultaneously multiple
> write commands to a zone, doing so avoid reordering of sequential writes to
> sequential zones. This method is however ineffective when scsi-mq is used with
> zoned block devices. This is due to the different execution model of blk-mq
> which passes a request to the scsi layer for dispatching after the request has
> been removed from the I/O scheduler queue. That is, when the scsi layer tries
> to lock the target zone of the request, the request may already be out of
> order and zone write locking fails to prevent that.
>
> Various approaches have been tried to solve this problem directly from the core
> code of blk-mq. All of them had the serious disadvantage of cluttering blk-mq
> code with zoned block device specific conditions and processing, making
> maintenance and testing difficult.
>
> This series adds blk-mq support for zoned block devices at the I/O scheduler
> level with simple modifications of the mq-deadline scheduler. Implementation
> is done with reusable helpers defined in the zoned block device support file
> (blk-zoned.c). These helpers provide per zone write locking control functions
> similar to what was implemented directly in the SCSI layer in sd_zbc.c.
> The zone write locking mechanism is used by mq-deadline for the exact same
> purpose, that is, to limit writes per zone to at most one request to avoid
> reordering.
>
> The changes to mq-deadline do not affect its operation with regular disks. The
> same scheduling behavior is maintained for these devices. Compared to the SCSI
> layer zone locking implementation, this series optimizes avoids locking
> conventional zones which result in a use of these zone that is comparable to a
> regular disk.
>
> This series also implements changes to the legacy deadline-iosched. Doing so,
> the zone locking code at the SCSI layer in sd.c and sd_zbc.c can be removed.
> This results in a significant simplification of the sd driver command handling.
>
> Patch 1 to 5 introduce the zone locking helpers in the block layer and modify
> the deadline and mq-deadline schedulers.
> Patch 6 and 7 remove the SCSI layer zone locking and initialize the device
> request queue zone information.
>
> All patches apply without conflicts to the scsi tree branch 4.16/scsi-queue, to
> the block tree branch for-linus as well as to the current 4.15-rc4 tree.
>
> Of note is that this series imposes the use of the deadline and mq-deadline
> schedulers with zoned block devices. A system can trivialy enforce this using
> a udev rule such as:
>
> ACTION=="add|change", KERNEL=="sd[a-z]", ATTRS{queue/zoned}=="host-managed", \
> ATTR{queue/scheduler}="deadline"
>
> This rules applies equally for the legacy SCSI path as well as the scsi-mq path
> thanks to "mq-deadline" being aliased to "deadline".
>
> Comments are as always very much appreciated.
This looks OK for me for 4.16. I can grab all of them, or I can leave
the last two for Martin to apply if he prefers that, though that will
add a block tree dependency for SCSI.
Martin?
--
Jens Axboe
next prev parent reply other threads:[~2018-01-05 16:21 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-12-21 6:43 [PATCH V9 0/7] blk-mq support for ZBC disks Damien Le Moal
2017-12-21 6:43 ` [PATCH V9 1/7] block: introduce zoned block devices zone write locking Damien Le Moal
2017-12-21 6:43 ` [PATCH V9 2/7] mq-deadline: Introduce dispatch helpers Damien Le Moal
2017-12-21 6:43 ` [PATCH V9 3/7] mq-deadline: Introduce zone locking support Damien Le Moal
2017-12-21 6:43 ` [PATCH V9 4/7] deadline-iosched: Introduce dispatch helpers Damien Le Moal
2017-12-21 6:43 ` [PATCH V9 5/7] deadline-iosched: Introduce zone locking support Damien Le Moal
2017-12-21 6:43 ` [PATCH V9 6/7] sd_zbc: Initialize device request queue zoned data Damien Le Moal
2017-12-21 6:43 ` [PATCH V9 7/7] sd: Remove zone write locking Damien Le Moal
2018-01-05 16:21 ` Jens Axboe [this message]
2018-01-08 15:52 ` [PATCH V9 0/7] blk-mq support for ZBC disks Martin K. Petersen
2018-01-08 16:07 ` Jens Axboe
2018-01-09 3:14 ` Martin K. Petersen
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20180105162150.GA16978@kernel.dk \
--to=axboe@kernel.dk \
--cc=Bart.VanAssche@wdc.com \
--cc=damien.lemoal@wdc.com \
--cc=hch@lst.de \
--cc=linux-block@vger.kernel.org \
--cc=linux-scsi@vger.kernel.org \
--cc=martin.petersen@oracle.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.