All of lore.kernel.org
 help / color / mirror / Atom feed
From: Zhiguo Niu <niuzhiguo84@gmail.com>
To: Bart Van Assche <bvanassche@acm.org>
Cc: Zhiguo Niu <zhiguo.niu@unisoc.com>,
	axboe@kernel.dk, linux-kernel@vger.kernel.org,
	 linux-block@vger.kernel.org, ke.wang@unisoc.com,
	hongyu.jin@unisoc.com,  Damien Le Moal <dlemoal@kernel.org>
Subject: Re: [PATCH] block/mq-deadline: Fix WARN when set async_depth by sysfs
Date: Mon, 1 Apr 2024 08:58:04 +0800	[thread overview]
Message-ID: <CAHJ8P3K9OL6MHNrSrqmf0esbr2h1HJ3mVRmxDNVpf95ZMHQcqg@mail.gmail.com> (raw)
In-Reply-To: <890bd06d-2a94-4138-9854-4a7ed74e0e51@acm.org>

On Sat, Mar 30, 2024 at 2:08 AM Bart Van Assche <bvanassche@acm.org> wrote:
>
> On 3/28/24 7:44 PM, Zhiguo Niu wrote:
> > diff --git a/block/mq-deadline.c b/block/mq-deadline.c
> > index 02a916b..89c516e 100644
> > --- a/block/mq-deadline.c
> > +++ b/block/mq-deadline.c
> > @@ -646,10 +646,12 @@ 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;
> > +     unsigned int dd_min_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);
> > +     sbitmap_queue_min_shallow_depth(&tags->bitmap_tags, dd_min_depth);
> >   }
>
> The above patch sets min_shallow_depth to the same value as commit
> d47f9717e5cf ("block/mq-deadline: use correct way to throttling write
> requests"). That commit got reverted because it was causing performance
> problems. So the above patch reintroduces the performance problem that
> has been fixed by commit 256aab46e316 ("Revert "block/mq-deadline: use
> correct way to throttling write requests"").
Hi Bart Van Assche,

This  patch only modifies the initial minimum value of
min_shallow_depth and does not change "dd->async_depth",
so it will not cause performance problems like the previous patch
(d47f9717e5cf ("block/mq-deadline: use correct way to throttling write
> requests")).
>
> Thank you for attempting to reintroduce a problem that just got fixed
> without even mentioning that this is an attempt to reintroduce a
> performance problem.

So what are your suggestions for fixing the warning shown in commit
msg if dd->async_depth is set by the user from sysfs?
thanks
>
> Bart.
>
>

  reply	other threads:[~2024-04-01  0:58 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-03-29  2:44 [PATCH] block/mq-deadline: Fix WARN when set async_depth by sysfs Zhiguo Niu
2024-03-29  3:40 ` Damien Le Moal
2024-03-29  9:43   ` Zhiguo Niu
2024-03-29 18:08 ` Bart Van Assche
2024-04-01  0:58   ` Zhiguo Niu [this message]
2024-04-01 21:23     ` Bart Van Assche
2024-04-02  5:44       ` Zhiguo Niu
2024-04-02 23:20         ` Bart Van Assche
2024-04-03  5:41           ` Zhiguo Niu

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=CAHJ8P3K9OL6MHNrSrqmf0esbr2h1HJ3mVRmxDNVpf95ZMHQcqg@mail.gmail.com \
    --to=niuzhiguo84@gmail.com \
    --cc=axboe@kernel.dk \
    --cc=bvanassche@acm.org \
    --cc=dlemoal@kernel.org \
    --cc=hongyu.jin@unisoc.com \
    --cc=ke.wang@unisoc.com \
    --cc=linux-block@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --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 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.