From: Bart Van Assche <bvanassche@acm.org>
To: Damien Le Moal <dlemoal@kernel.org>, Christoph Hellwig <hch@lst.de>
Cc: Jens Axboe <axboe@kernel.dk>, linux-block@vger.kernel.org
Subject: Re: [PATCH v2 4/4] block/mq-deadline: Prevent zoned write reordering due to I/O prioritization
Date: Tue, 19 Dec 2023 16:48:25 -0800 [thread overview]
Message-ID: <2e475db5-fd09-483c-9c34-d9bf9e64d273@acm.org> (raw)
In-Reply-To: <6d2e8aaa-3e0e-4f8e-8295-0f74b65f23ae@kernel.org>
On 12/19/23 16:05, Damien Le Moal wrote:
> On 12/20/23 02:42, Bart Van Assche wrote:
>> diff --git a/block/blk-mq.c b/block/blk-mq.c
>> index c11c97afa0bc..668888103a47 100644
>> --- a/block/blk-mq.c
>> +++ b/block/blk-mq.c
>> @@ -2922,6 +2922,13 @@ static bool blk_mq_can_use_cached_rq(struct request *rq, struct blk_plug *plug,
>>
>> static void bio_set_ioprio(struct bio *bio)
>> {
>> + /*
>> + * Do not set the I/O priority of sequential zoned write bios because
>> + * this could lead to reordering and hence to unaligned write errors.
>> + */
>> + if (blk_bio_is_seq_zoned_write(bio))
>> + return;
>
> That is not acceptable as that will ignore priorities passed for async direct
> IOs through aio->aio_reqprio. That one is a perfectly acceptable use case and we
> should not ignore it.
Hi Damien,
What you wrote is wrong. bio_set_ioprio() applies the I/O priority set
by ionice or by the blk-ioprio cgroup policy. The above patch does not
affect the priorities set via aio_reqprio. aio_reqprio is still copied
in ki_ioprio and ki_ioprio is still copied into bi_ioprio by the direct
I/O code.
Bart.
next prev parent reply other threads:[~2023-12-20 0:48 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-12-18 21:13 [PATCH v2 0/4] Improve I/O priority support in mq-deadline for zoned writes Bart Van Assche
2023-12-18 21:13 ` [PATCH v2 1/4] block/mq-deadline: Rename dd_rq_ioclass() and change its return type Bart Van Assche
2023-12-18 21:13 ` [PATCH v2 2/4] block/mq-deadline: Introduce dd_bio_ioclass() Bart Van Assche
2023-12-18 21:13 ` [PATCH v2 3/4] block/mq-deadline: Introduce deadline_first_rq_past_pos() Bart Van Assche
2023-12-18 21:13 ` [PATCH v2 4/4] block/mq-deadline: Prevent zoned write reordering due to I/O prioritization Bart Van Assche
2023-12-19 12:10 ` Christoph Hellwig
2023-12-19 17:42 ` Bart Van Assche
2023-12-20 0:05 ` Damien Le Moal
2023-12-20 0:48 ` Bart Van Assche [this message]
2023-12-20 1:28 ` Damien Le Moal
2023-12-20 3:53 ` Christoph Hellwig
2023-12-20 4:40 ` 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=2e475db5-fd09-483c-9c34-d9bf9e64d273@acm.org \
--to=bvanassche@acm.org \
--cc=axboe@kernel.dk \
--cc=dlemoal@kernel.org \
--cc=hch@lst.de \
--cc=linux-block@vger.kernel.org \
/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