From: Ming Lei <ming.lei@redhat.com>
To: Julian Sun <sunjunchao2870@gmail.com>
Cc: linux-block@vger.kernel.org, axboe@kernel.dk,
nilay@linux.ibm.com, Julian Sun <sunjunchao@bytedance.com>,
stable@vger.kernel.org
Subject: Re: [PATCH v2] block: restore default wbt enablement
Date: Wed, 13 Aug 2025 08:41:53 +0800 [thread overview]
Message-ID: <aJvfUVcsbxzsMB2m@fedora> (raw)
In-Reply-To: <20250812154257.57540-1-sunjunchao@bytedance.com>
On Tue, Aug 12, 2025 at 11:42:57PM +0800, Julian Sun wrote:
> The commit 245618f8e45f ("block: protect wbt_lat_usec using
> q->elevator_lock") protected wbt_enable_default() with
> q->elevator_lock; however, it also placed wbt_enable_default()
> before blk_queue_flag_set(QUEUE_FLAG_REGISTERED, q);, resulting
> in wbt failing to be enabled.
>
> Moreover, the protection of wbt_enable_default() by q->elevator_lock
> was removed in commit 78c271344b6f ("block: move wbt_enable_default()
> out of queue freezing from sched ->exit()"), so we can directly fix
> this issue by placing wbt_enable_default() after
> blk_queue_flag_set(QUEUE_FLAG_REGISTERED, q);.
>
> Additionally, this issue also causes the inability to read the
> wbt_lat_usec file, and the scenario is as follows:
>
> root@q:/sys/block/sda/queue# cat wbt_lat_usec
> cat: wbt_lat_usec: Invalid argument
>
> root@q:/data00/sjc/linux# ls /sys/kernel/debug/block/sda/rqos
> cannot access '/sys/kernel/debug/block/sda/rqos': No such file or directory
>
> root@q:/data00/sjc/linux# find /sys -name wbt
> /sys/kernel/debug/tracing/events/wbt
>
> After testing with this patch, wbt can be enabled normally.
>
> Signed-off-by: Julian Sun <sunjunchao@bytedance.com>
> Cc: stable@vger.kernel.org
> Fixes: 245618f8e45f ("block: protect wbt_lat_usec using q->elevator_lock")
Looks fine,
Reviewed-by: Ming Lei <ming.lei@redhat.com>
Thanks,
Ming
next prev parent reply other threads:[~2025-08-13 0:42 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-08-12 15:42 [PATCH v2] block: restore default wbt enablement Julian Sun
2025-08-13 0:41 ` Ming Lei [this message]
2025-08-13 3:27 ` Yu Kuai
2025-08-13 5:03 ` Nilay Shroff
2025-08-13 12:32 ` Jens Axboe
2025-08-14 8:08 ` kernel test robot
2025-08-14 8:40 ` Nilay Shroff
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=aJvfUVcsbxzsMB2m@fedora \
--to=ming.lei@redhat.com \
--cc=axboe@kernel.dk \
--cc=linux-block@vger.kernel.org \
--cc=nilay@linux.ibm.com \
--cc=stable@vger.kernel.org \
--cc=sunjunchao2870@gmail.com \
--cc=sunjunchao@bytedance.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.