2023-05-08 05:12:01

by Lukas Bulwahn

[permalink] [raw]
Subject: Situation of CONFIG_BLK_WBT_MQ after commit b11d31ae01e6 ("blk-wbt: remove unnecessary check in wbt_enable_default()")

Dear Yu Kuai, dear Christoph, dear Jens,


The commit b11d31ae01e6 ("blk-wbt: remove unnecessary check in
wbt_enable_default()") removes the only reference to the config
BLK_WBT_MQ in the kernel tree.

The commit comes with the statement "If CONFIG_BLK_WBT_MQ is disabled,
wbt_init() won't do anything.". The statement "If CONFIG_BLK_WBT is
disabled, wbt_init() won't do anything." (note: CONFIG_BLK_WBT vs.
CONFIG_BLK_WBT_MQ) is certainly true, but I do not see that "If
CONFIG_BLK_WBT_MQ is disabled, wbt_init() won't do anything.", but I
believe it would simply do what wbt_init() does with CONFIG_BLK_WBT
being enabled.

Now, it seems that with this commit applied, the intended switch of
the config BLK_WBT_MQ is gone, and the config really now has no effect
at all.

So, I am a bit puzzled:

1. Either the config BLK_WBT_MQ does have an effect somewhere, but one
cannot find its reference with 'git grep -i "BLK_WBT_MQ" .' --- so, my
investigation is just incomplete or wrong, or

2. We really do not need this further build config BLK_WBT_MQ beyond
the other configs already there --- then this config should just be
removed, or

3. the commit unintentionally broke the purpose of the config
BLK_WBT_MQ --- then this commit above should be reverted.

I would be happy if you could provide some guidance on what is the
situation with config BLK_WBT_MQ.

Currently, I am guessing it is option 2 and the config BLK_WBT_MQ
simply can be deleted, but I am really unsure. Probably, this build
option is not used by many people and its effect is hardly noticed, if
one does not specifically check for that in the running system.


Best regards,

Lukas


2023-05-10 03:31:07

by Yu Kuai

[permalink] [raw]
Subject: Re: Situation of CONFIG_BLK_WBT_MQ after commit b11d31ae01e6 ("blk-wbt: remove unnecessary check in wbt_enable_default()")

Hi,

在 2023/05/08 12:37, Lukas Bulwahn 写道:
> Dear Yu Kuai, dear Christoph, dear Jens,
>
>
> The commit b11d31ae01e6 ("blk-wbt: remove unnecessary check in
> wbt_enable_default()") removes the only reference to the config
> BLK_WBT_MQ in the kernel tree.
>
> The commit comes with the statement "If CONFIG_BLK_WBT_MQ is disabled,
> wbt_init() won't do anything.". The statement "If CONFIG_BLK_WBT is
> disabled, wbt_init() won't do anything." (note: CONFIG_BLK_WBT vs.
> CONFIG_BLK_WBT_MQ) is certainly true, but I do not see that "If
> CONFIG_BLK_WBT_MQ is disabled, wbt_init() won't do anything.", but I
> believe it would simply do what wbt_init() does with CONFIG_BLK_WBT
> being enabled.
>
> Now, it seems that with this commit applied, the intended switch of
> the config BLK_WBT_MQ is gone, and the config really now has no effect
> at all.
>
> So, I am a bit puzzled:
>
> 1. Either the config BLK_WBT_MQ does have an effect somewhere, but one
> cannot find its reference with 'git grep -i "BLK_WBT_MQ" .' --- so, my
> investigation is just incomplete or wrong, or
>
> 2. We really do not need this further build config BLK_WBT_MQ beyond
> the other configs already there --- then this config should just be
> removed, or
>
> 3. the commit unintentionally broke the purpose of the config
> BLK_WBT_MQ --- then this commit above should be reverted.

Thanks for the report, it's the above case and it's my mistake.
I will fix this.

Kuai
>
> I would be happy if you could provide some guidance on what is the
> situation with config BLK_WBT_MQ.
>
> Currently, I am guessing it is option 2 and the config BLK_WBT_MQ
> simply can be deleted, but I am really unsure. Probably, this build
> option is not used by many people and its effect is hardly noticed, if
> one does not specifically check for that in the running system.
>
>
> Best regards,
>
> Lukas
> .
>

2023-05-10 05:51:05

by Lukas Bulwahn

[permalink] [raw]
Subject: Re: Situation of CONFIG_BLK_WBT_MQ after commit b11d31ae01e6 ("blk-wbt: remove unnecessary check in wbt_enable_default()")

On Wed, May 10, 2023 at 5:24 AM Yu Kuai <[email protected]> wrote:
>
> Hi,
>
> 在 2023/05/08 12:37, Lukas Bulwahn 写道:
> > Dear Yu Kuai, dear Christoph, dear Jens,
> >
> >
> > The commit b11d31ae01e6 ("blk-wbt: remove unnecessary check in
> > wbt_enable_default()") removes the only reference to the config
> > BLK_WBT_MQ in the kernel tree.
> >
> > The commit comes with the statement "If CONFIG_BLK_WBT_MQ is disabled,
> > wbt_init() won't do anything.". The statement "If CONFIG_BLK_WBT is
> > disabled, wbt_init() won't do anything." (note: CONFIG_BLK_WBT vs.
> > CONFIG_BLK_WBT_MQ) is certainly true, but I do not see that "If
> > CONFIG_BLK_WBT_MQ is disabled, wbt_init() won't do anything.", but I
> > believe it would simply do what wbt_init() does with CONFIG_BLK_WBT
> > being enabled.
> >
> > Now, it seems that with this commit applied, the intended switch of
> > the config BLK_WBT_MQ is gone, and the config really now has no effect
> > at all.
> >
> > So, I am a bit puzzled:
> >
> > 1. Either the config BLK_WBT_MQ does have an effect somewhere, but one
> > cannot find its reference with 'git grep -i "BLK_WBT_MQ" .' --- so, my
> > investigation is just incomplete or wrong, or
> >
> > 2. We really do not need this further build config BLK_WBT_MQ beyond
> > the other configs already there --- then this config should just be
> > removed, or
> >
> > 3. the commit unintentionally broke the purpose of the config
> > BLK_WBT_MQ --- then this commit above should be reverted.
>
> Thanks for the report, it's the above case and it's my mistake.
> I will fix this.
>

Kuai, thanks for letting me know. Feel free to add a "Reported-by:
Lukas Bulwahn <[email protected]>" tag, and to include in the
list of recipients when you send out the fix to the mailing list.

I am glad to see that my investigation of kernel code is finding some
issues that we can fix.

Lukas

2023-05-11 08:47:41

by Yu Kuai

[permalink] [raw]
Subject: Re: Situation of CONFIG_BLK_WBT_MQ after commit b11d31ae01e6 ("blk-wbt: remove unnecessary check in wbt_enable_default()")

Hi,

在 2023/05/10 13:40, Lukas Bulwahn 写道:
> On Wed, May 10, 2023 at 5:24 AM Yu Kuai <[email protected]> wrote:
>>
>> Hi,
>>
>> 在 2023/05/08 12:37, Lukas Bulwahn 写道:
>>> Dear Yu Kuai, dear Christoph, dear Jens,
>>>
>>>
>>> The commit b11d31ae01e6 ("blk-wbt: remove unnecessary check in
>>> wbt_enable_default()") removes the only reference to the config
>>> BLK_WBT_MQ in the kernel tree.
>>>
>>> The commit comes with the statement "If CONFIG_BLK_WBT_MQ is disabled,
>>> wbt_init() won't do anything.". The statement "If CONFIG_BLK_WBT is
>>> disabled, wbt_init() won't do anything." (note: CONFIG_BLK_WBT vs.
>>> CONFIG_BLK_WBT_MQ) is certainly true, but I do not see that "If
>>> CONFIG_BLK_WBT_MQ is disabled, wbt_init() won't do anything.", but I
>>> believe it would simply do what wbt_init() does with CONFIG_BLK_WBT
>>> being enabled.
>>>
>>> Now, it seems that with this commit applied, the intended switch of
>>> the config BLK_WBT_MQ is gone, and the config really now has no effect
>>> at all.
>>>
>>> So, I am a bit puzzled:
>>>
>>> 1. Either the config BLK_WBT_MQ does have an effect somewhere, but one
>>> cannot find its reference with 'git grep -i "BLK_WBT_MQ" .' --- so, my
>>> investigation is just incomplete or wrong, or
>>>
>>> 2. We really do not need this further build config BLK_WBT_MQ beyond
>>> the other configs already there --- then this config should just be
>>> removed, or
>>>
>>> 3. the commit unintentionally broke the purpose of the config
>>> BLK_WBT_MQ --- then this commit above should be reverted.
>>
>> Thanks for the report, it's the above case and it's my mistake.
>> I will fix this.
>>
>
> Kuai, thanks for letting me know. Feel free to add a "Reported-by:
> Lukas Bulwahn <[email protected]>" tag, and to include in the
> list of recipients when you send out the fix to the mailing list.

I just send the fix, sorry that I forgot to cc you...

https://lore.kernel.org/all/[email protected]/

Thanks,
Kuai
>
> I am glad to see that my investigation of kernel code is finding some
> issues that we can fix.
>
> Lukas
> .
>


2023-05-14 12:27:21

by Thorsten Leemhuis

[permalink] [raw]
Subject: Re: Situation of CONFIG_BLK_WBT_MQ after commit b11d31ae01e6 ("blk-wbt: remove unnecessary check in wbt_enable_default()")

[CCing the regression list, as it should be in the loop for regressions:
https://docs.kernel.org/admin-guide/reporting-regressions.html]

[TLDR: I'm adding this report to the list of tracked Linux kernel
regressions; the text you find below is based on a few templates
paragraphs you might have encountered already in similar form.
See link in footer if these mails annoy you.]

On 08.05.23 06:37, Lukas Bulwahn wrote:
>
> The commit b11d31ae01e6 ("blk-wbt: remove unnecessary check in
> wbt_enable_default()") removes the only reference to the config
> BLK_WBT_MQ in the kernel tree.
> [...]

Thanks for the report. I know a fix is already in the works but to
ensure the issue doesn't fall through the cracks unnoticed, I'm adding
it to regzbot, the Linux kernel regression tracking bot:

#regzbot ^introduced b11d31ae01e6
#regzbot title block/blk-wbt: wbt can't be disabled by default
#regzbot ignore-activity
#regzbot monitor:
https://lore.kernel.org/all/[email protected]/

This isn't a regression? This issue or a fix for it are already
discussed somewhere else? It was fixed already? You want to clarify when
the regression started to happen? Or point out I got the title or
something else totally wrong? Then just reply and tell me -- ideally
while also telling regzbot about it, as explained by the page listed in
the footer of this mail.

Developers: When fixing the issue, remember to add 'Link:' tags pointing
to the report (the parent of this mail). See page linked in footer for
details.

Ciao, Thorsten (wearing his 'the Linux kernel's regression tracker' hat)
--
Everything you wanna know about Linux kernel regression tracking:
https://linux-regtracking.leemhuis.info/about/#tldr
That page also explains what to do if mails like this annoy you.