From: Bart Van Assche <Bart.VanAssche@wdc.com>
To: "linux-scsi@vger.kernel.org" <linux-scsi@vger.kernel.org>,
"linux-block@vger.kernel.org" <linux-block@vger.kernel.org>,
Damien Le Moal <Damien.LeMoal@wdc.com>,
"martin.petersen@oracle.com" <martin.petersen@oracle.com>,
"axboe@kernel.dk" <axboe@kernel.dk>
Cc: "hch@lst.de" <hch@lst.de>
Subject: Re: [PATCH V5 13/14] block: mq-deadline: Limit write request dispatch for zoned block devices
Date: Mon, 25 Sep 2017 22:06:59 +0000 [thread overview]
Message-ID: <1506377218.2641.37.camel@wdc.com> (raw)
In-Reply-To: <20170925061454.5533-14-damien.lemoal@wdc.com>
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(dd->fifo_list[data_dir].next);
> +
> + spin_lock_irqsave(&dd->zone_lock, flags);
> +
> + list_for_each_entry(rq, &dd->fifo_list[WRITE], queuelist) {
> + if (deadline_can_dispatch_request(dd, rq))
> + goto out;
> + }
> + rq = NULL;
> +
> +out:
> + spin_unlock_irqrestore(&dd->zone_lock, flags);
Is it documented somewhere what dd->zone_lock protects and when that lock should be
acquired?
> /*
> * This may be a requeue of a request that has locked its
> - * target zone. If this is the case, release the request zone lock.
> + * target zone. If this is the case, release the zone lock.
> */
> if (deadline_request_has_zone_wlock(rq))
> deadline_wunlock_zone(dd, rq);
Can this change be folded into the patch that introduced that comment?
> @@ -570,6 +621,9 @@ static void dd_insert_request(struct blk_mq_hw_ctx *hctx, struct request *rq,
>
> blk_mq_sched_request_inserted(rq);
>
> + if (at_head && deadline_request_needs_zone_wlock(dd, rq))
> + pr_info("######## Write at head !\n");
> +
> if (at_head || blk_rq_is_passthrough(rq)) {
> if (at_head)
> list_add(&rq->queuelist, &dd->dispatch);
Will it be easy to users who analyze a kernel log to figure out why that
message has been generated? Should that message perhaps include the block
device name, zone number and request sector number?
Thanks,
Bart.
next prev parent reply other threads:[~2017-09-25 22:07 UTC|newest]
Thread overview: 28+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-09-25 6:14 [PATCH V5 00/14] scsi-mq support for ZBC disks Damien Le Moal
2017-09-25 6:14 ` [PATCH V5 01/14] scsi: sd_zbc: Move ZBC declarations to scsi_proto.h Damien Le Moal
2017-09-25 6:14 ` [PATCH V5 02/14] scsi: sd_zbc: Fix comments and indentation Damien Le Moal
2017-10-02 23:01 ` Bart Van Assche
2017-09-25 6:14 ` [PATCH V5 03/14] scsi: sd_zbc: Rearrange code Damien Le Moal
2017-09-25 21:02 ` Bart Van Assche
2017-09-25 6:14 ` [PATCH V5 04/14] scsi: sd_zbc: Use well defined macros Damien Le Moal
2017-09-25 6:14 ` [PATCH V5 05/14] scsi: sd_zbc: Fix sd_zbc_read_zoned_characteristics() Damien Le Moal
2017-09-25 6:14 ` [PATCH V5 06/14] block: Add zoned block device information to request queue Damien Le Moal
2017-09-25 10:05 ` Ming Lei
2017-09-25 21:06 ` Bart Van Assche
2017-09-25 6:14 ` [PATCH V5 07/14] scsi: sd_zbc: Initialize device request queue zoned data Damien Le Moal
2017-09-25 21:17 ` Bart Van Assche
2017-10-02 4:29 ` Damien Le Moal
2017-09-25 6:14 ` [PATCH V5 08/14] scsi: sd_zbc: Limit zone write locking to sequential zones Damien Le Moal
2017-09-25 6:14 ` [PATCH V5 09/14] scsi: sd_zbc: Disable zone write locking with scsi-mq Damien Le Moal
2017-09-25 6:14 ` [PATCH V5 10/14] block: mq-deadline: Add zoned block device data Damien Le Moal
2017-09-25 21:34 ` Bart Van Assche
2017-10-02 4:32 ` Damien Le Moal
2017-09-25 6:14 ` [PATCH V5 11/14] blokc: mq-deadline: Introduce dispatch helpers Damien Le Moal
2017-09-25 21:44 ` Bart Van Assche
2017-09-25 6:14 ` [PATCH V5 12/14] block: mq-deadline: Introduce zone locking support Damien Le Moal
2017-09-25 22:00 ` Bart Van Assche
2017-10-02 4:36 ` Damien Le Moal
2017-09-25 6:14 ` [PATCH V5 13/14] block: mq-deadline: Limit write request dispatch for zoned block devices Damien Le Moal
2017-09-25 22:06 ` Bart Van Assche [this message]
2017-10-02 4:38 ` Damien Le Moal
2017-09-25 6:14 ` [PATCH V5 14/14] block: do not set mq default scheduler Damien Le Moal
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=1506377218.2641.37.camel@wdc.com \
--to=bart.vanassche@wdc.com \
--cc=Damien.LeMoal@wdc.com \
--cc=axboe@kernel.dk \
--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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).