[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <f5e3a283-8f0a-12c0-94f0-19263bb3883d@acm.org>
Date: Thu, 3 Aug 2023 10:01:10 -0700
From: Bart Van Assche <bvanassche@....org>
To: Zhiguo Niu <zhiguo.niu@...soc.com>, axboe@...nel.dk
Cc: linux-block@...r.kernel.org, linux-kernel@...r.kernel.org,
niuzhiguo84@...il.com, hongyu.jin@...soc.com,
yunlong.xing@...soc.com
Subject: Re: [PATCH] block/mq-deadline: use correct way to throttling write
requests
On 8/3/23 04:12, Zhiguo Niu wrote:
> diff --git a/block/mq-deadline.c b/block/mq-deadline.c
> index 5839a027e0f0..7e043d4a78f8 100644
> --- a/block/mq-deadline.c
> +++ b/block/mq-deadline.c
> @@ -620,8 +620,9 @@ 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(1UL, 3 * q->nr_requests / 4);
> + dd->async_depth = max(1U, 3 * (1U << shift) / 4);
>
> sbitmap_queue_min_shallow_depth(&tags->bitmap_tags, dd->async_depth);
> }
Reviewed-by: Bart Van Assche <bvanassche@....org>
Powered by blists - more mailing lists