Linux block layer
 help / color / mirror / Atom feed
From: Tang Yizhou <tangyeechou@gmail.com>
To: yukuai@fygo.io, Tang Yizhou <yizhou.tang@shopee.com>,
	axboe@kernel.dk, guzebing1612@gmail.com
Cc: linux-block@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] blk-wbt: Always change enable_state to MANUAL when setting latency
Date: Sat, 1 Aug 2026 02:02:10 +0800	[thread overview]
Message-ID: <b8047ecc-6cbc-47ab-94a7-0c2ce777d100@gmail.com> (raw)
In-Reply-To: <2c695292-2fa6-45c1-86e9-d4bf0100debb@fygo.io>

On 24/7/26 2:51 pm, yu kuai wrote:
> 在 2026/7/17 20:50, Tang Yizhou 写道:
> 
>> From: Tang Yizhou<yizhou.tang@shopee.com>
>>
>> Commit 1e56f30a73f3 ("block: Make WBT latency writes honor enable
>> state") compares only the boolean enabled state in the no-op check.
>> Writing the current latency value while WBT is in WBT_STATE_ON_DEFAULT
>> is therefore still skipped, and enable_state is not changed to
>> WBT_STATE_ON_MANUAL. A subsequent elevator switch to BFQ then disables
>> WBT through wbt_disable_default(), silently discarding the explicit
>> sysfs setting:
>>
>>    # enable_state = WBT_STATE_ON_DEFAULT, min_lat_nsec = 2000000
>>    echo 2000 > /sys/block/nullb0/queue/wbt_lat_usec  # skipped as a no-op
>>    echo bfq > /sys/block/nullb0/queue/scheduler
>>    cat /sys/block/nullb0/queue/wbt_lat_usec          # 0, WBT disabled
>>
>> Skip the update only if the stored latency matches and enable_state
>> already equals the exact target state: WBT_STATE_ON_MANUAL for a
>> non-zero value, WBT_STATE_OFF_MANUAL for zero.
>>
>> A write that passes the check then reaches wbt_set_min_lat(), which
>> performs the actual transition to the MANUAL state.
>>
>> Rename the helper to wbt_lat_changed() to improve readability.
>>
>> Fixes: 1e56f30a73f3 ("block: Make WBT latency writes honor enable state")
>> Signed-off-by: Tang Yizhou<yizhou.tang@shopee.com>
>> ---
>>   block/blk-wbt.c | 14 +++++++++++---
>>   1 file changed, 11 insertions(+), 3 deletions(-)
> Reviewed-by: Yu Kuai <yukuai@fygo.io>
> 

Hi Jens, if there are no further objections, could this patch be merged?

-- 
Best Regards,
Yi


  reply	other threads:[~2026-07-31 18:02 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-07-17 12:50 [PATCH] blk-wbt: Always change enable_state to MANUAL when setting latency Tang Yizhou
2026-07-24  6:51 ` yu kuai
2026-07-31 18:02   ` Tang Yizhou [this message]
2026-07-24  9:50 ` guzebing

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=b8047ecc-6cbc-47ab-94a7-0c2ce777d100@gmail.com \
    --to=tangyeechou@gmail.com \
    --cc=axboe@kernel.dk \
    --cc=guzebing1612@gmail.com \
    --cc=linux-block@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=yizhou.tang@shopee.com \
    --cc=yukuai@fygo.io \
    /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