From: Harshit Mogalapalli <harshit.m.mogalapalli@oracle.com>
To: Bart Van Assche <bvanassche@acm.org>, Jens Axboe <axboe@kernel.dk>
Cc: linux-block@vger.kernel.org, Christoph Hellwig <hch@lst.de>,
stable@vger.kernel.org, Damien Le Moal <dlemoal@kernel.org>,
Zhiguo Niu <Zhiguo.Niu@unisoc.com>
Subject: Re: [PATCH] Revert "block/mq-deadline: use correct way to throttling write requests"
Date: Thu, 14 Mar 2024 13:28:38 +0530 [thread overview]
Message-ID: <0197fbc8-41ac-4b85-a523-5e5bbe02f3ca@oracle.com> (raw)
In-Reply-To: <20240313214218.1736147-1-bvanassche@acm.org>
Hi Bart, Jens and Zhiguo,
On 14/03/24 03:12, Bart Van Assche wrote:
> The code "max(1U, 3 * (1U << shift) / 4)" comes from the Kyber I/O
> scheduler. The Kyber I/O scheduler maintains one internal queue per hwq
> and hence derives its async_depth from the number of hwq tags. Using
> this approach for the mq-deadline scheduler is wrong since the
> mq-deadline scheduler maintains one internal queue for all hwqs
> combined. Hence this revert.
>
Thanks a lot for helping with this performance regression[1].
Regards,
Harshit
[1]
https://lore.kernel.org/all/5ce2ae5d-61e2-4ede-ad55-551112602401@oracle.com/
> Cc: stable@vger.kernel.org
> Cc: Damien Le Moal <dlemoal@kernel.org>
> Cc: Harshit Mogalapalli <harshit.m.mogalapalli@oracle.com>
> Cc: Zhiguo Niu <Zhiguo.Niu@unisoc.com>
> Fixes: d47f9717e5cf ("block/mq-deadline: use correct way to throttling write requests")
> Signed-off-by: Bart Van Assche <bvanassche@acm.org>
> ---
> block/mq-deadline.c | 3 +--
> 1 file changed, 1 insertion(+), 2 deletions(-)
>
> diff --git a/block/mq-deadline.c b/block/mq-deadline.c
> index f958e79277b8..02a916ba62ee 100644
> --- a/block/mq-deadline.c
> +++ b/block/mq-deadline.c
> @@ -646,9 +646,8 @@ static void dd_depth_updated(struct blk_mq_hw_ctx *hctx)
> struct request_queue *q = hctx->queue;
> struct deadline_data *dd = q->elevator->elevator_data;
> struct blk_mq_tags *tags = hctx->sched_tags;
> - unsigned int shift = tags->bitmap_tags.sb.shift;
>
> - dd->async_depth = max(1U, 3 * (1U << shift) / 4);
> + dd->async_depth = max(1UL, 3 * q->nr_requests / 4);
>
> sbitmap_queue_min_shallow_depth(&tags->bitmap_tags, dd->async_depth);
> }
prev parent reply other threads:[~2024-03-14 7:59 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-03-13 21:42 [PATCH] Revert "block/mq-deadline: use correct way to throttling write requests" Bart Van Assche
2024-03-13 21:56 ` Jens Axboe
2024-03-14 1:03 ` 答复: " 牛志国 (Zhiguo Niu)
2024-03-14 17:08 ` Bart Van Assche
2024-03-14 19:31 ` Jens Axboe
2024-03-14 7:58 ` Harshit Mogalapalli [this message]
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=0197fbc8-41ac-4b85-a523-5e5bbe02f3ca@oracle.com \
--to=harshit.m.mogalapalli@oracle.com \
--cc=Zhiguo.Niu@unisoc.com \
--cc=axboe@kernel.dk \
--cc=bvanassche@acm.org \
--cc=dlemoal@kernel.org \
--cc=hch@lst.de \
--cc=linux-block@vger.kernel.org \
--cc=stable@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