mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Bart Van Assche <bvanassche@acm.org>
To: Zhiguo Niu <zhiguo.niu@unisoc.com>, axboe@kernel.dk
Cc: linux-block@vger.kernel.org, linux-kernel@vger.kernel.org,
	niuzhiguo84@gmail.com, hongyu.jin@unisoc.com,
	yunlong.xing@unisoc.com
Subject: Re: [PATCH] block/mq-deadline: use correct way to throttling write requests
Date: Thu, 3 Aug 2023 10:01:10 -0700	[thread overview]
Message-ID: <f5e3a283-8f0a-12c0-94f0-19263bb3883d@acm.org> (raw)
In-Reply-To: <1691061162-22898-1-git-send-email-zhiguo.niu@unisoc.com>

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@acm.org>

  reply	other threads:[~2023-08-03 17:01 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-08-03 11:12 Zhiguo Niu
2023-08-03 17:01 ` Bart Van Assche [this message]
2023-08-08 21:46 ` Jens Axboe

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=f5e3a283-8f0a-12c0-94f0-19263bb3883d@acm.org \
    --to=bvanassche@acm.org \
    --cc=axboe@kernel.dk \
    --cc=hongyu.jin@unisoc.com \
    --cc=linux-block@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=niuzhiguo84@gmail.com \
    --cc=yunlong.xing@unisoc.com \
    --cc=zhiguo.niu@unisoc.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

all inboxes | Powered by JetHome®