Linux block layer
 help / color / mirror / Atom feed
From: Nilay Shroff <nilay@linux.ibm.com>
To: Julian Sun <sunjunchao2870@gmail.com>, linux-block@vger.kernel.org
Cc: axboe@kernel.dk, ming.lei@redhat.com,
	Julian Sun <sunjunchao@bytedance.com>,
	stable@vger.kernel.org
Subject: Re: [PATCH v2] block: restore default wbt enablement
Date: Wed, 13 Aug 2025 10:33:00 +0530	[thread overview]
Message-ID: <c6881897-e824-4978-bb27-3cf0be0303eb@linux.ibm.com> (raw)
In-Reply-To: <20250812154257.57540-1-sunjunchao@bytedance.com>



On 8/12/25 9:12 PM, 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 good to me:
Reviewed-by: Nilay Shroff <nilay@linux.ibm.com>

  parent reply	other threads:[~2025-08-13  5:03 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
2025-08-13  3:27 ` Yu Kuai
2025-08-13  5:03 ` Nilay Shroff [this message]
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=c6881897-e824-4978-bb27-3cf0be0303eb@linux.ibm.com \
    --to=nilay@linux.ibm.com \
    --cc=axboe@kernel.dk \
    --cc=linux-block@vger.kernel.org \
    --cc=ming.lei@redhat.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox