All of lore.kernel.org
 help / color / mirror / Atom feed
From: Damien Le Moal <dlemoal@kernel.org>
To: Bart Van Assche <bvanassche@acm.org>, Jens Axboe <axboe@kernel.dk>
Cc: linux-block@vger.kernel.org, Christoph Hellwig <hch@lst.de>
Subject: Re: [PATCH] block/blk-ioprio: Skip zoned writes that are not append operations
Date: Tue, 12 Dec 2023 08:31:19 +0900	[thread overview]
Message-ID: <19eaaa5b-e4b7-41aa-b5a2-7d5a89927a91@kernel.org> (raw)
In-Reply-To: <20231211231451.1452979-1-bvanassche@acm.org>

On 12/12/23 08:14, Bart Van Assche wrote:
> If REQ_OP_WRITE or REQ_OP_WRITE_ZEROES operations for the same zone
> originate from different cgroups that could result in different
> priorities being assigned to these operations. Do not modify the I/O
> priority of these write operations to prevent that these would be
> executed in the wrong order when using the mq-deadline I/O

...to prevent them from being executed in the wrong...

> scheduler.
> 
> Cc: Damien Le Moal <dlemoal@kernel.org>
> Cc: Christoph Hellwig <hch@lst.de>
> Signed-off-by: Bart Van Assche <bvanassche@acm.org>
> ---
>  block/blk-ioprio.c | 11 +++++++++++
>  1 file changed, 11 insertions(+)
> 
> diff --git a/block/blk-ioprio.c b/block/blk-ioprio.c
> index 4051fada01f1..09ce083a0e3a 100644
> --- a/block/blk-ioprio.c
> +++ b/block/blk-ioprio.c
> @@ -192,6 +192,17 @@ void blkcg_set_ioprio(struct bio *bio)
>  	if (!blkcg || blkcg->prio_policy == POLICY_NO_CHANGE)
>  		return;
>  
> +	/*
> +	 * If REQ_OP_WRITE or REQ_OP_WRITE_ZEROES operations for the same zone
> +	 * originate from different cgroups that could result in different
> +	 * priorities being assigned to these operations. Do not modify the I/O
> +	 * priority of these write operations to prevent that these would be
> +	 * executed in the wrong order when using the mq-deadline I/O
> +	 * scheduler.
> +	 */
> +	if (bdev_op_is_zoned_write(bio->bi_bdev, bio_op(bio)))

Ideally, we want the bio equivalent of blk_rq_is_seq_zoned_write() here so that
writes to conventional zones are not affected (these can be reordered).

> +		return;
> +
>  	if (blkcg->prio_policy == POLICY_PROMOTE_TO_RT ||
>  	    blkcg->prio_policy == POLICY_NONE_TO_RT) {
>  		/*

-- 
Damien Le Moal
Western Digital Research


  reply	other threads:[~2023-12-11 23:31 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-12-11 23:14 [PATCH] block/blk-ioprio: Skip zoned writes that are not append operations Bart Van Assche
2023-12-11 23:31 ` Damien Le Moal [this message]
2023-12-12  0:11   ` Bart Van Assche
2023-12-12 10:08     ` Damien Le Moal
2023-12-12 21:26     ` kernel test robot

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=19eaaa5b-e4b7-41aa-b5a2-7d5a89927a91@kernel.org \
    --to=dlemoal@kernel.org \
    --cc=axboe@kernel.dk \
    --cc=bvanassche@acm.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 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.