From: "Aithal, Srikanth" <sraithal@amd.com>
To: paulmck@kernel.org, Bert Karwatzki <spasswolf@web.de>
Cc: Andrew Morton <akpm@linux-foundation.org>,
Kuniyuki Iwashima <kuniyu@amazon.com>,
Mateusz Guzik <mjguzik@gmail.com>, Petr Mladek <pmladek@suse.com>,
Steven Rostedt <rostedt@goodmis.org>,
John Ogness <john.ogness@linutronix.de>,
Sergey Senozhatsky <senozhatsky@chromium.org>,
linux-kernel@vger.kernel.org,
Linux-Next Mailing List <linux-next@vger.kernel.org>
Subject: Re: commit dd4cf8c9e1f4 leads to failed boot
Date: Thu, 24 Apr 2025 10:00:36 +0530 [thread overview]
Message-ID: <5dbe2246-fb9d-4bc8-82a2-8cbffa913b6e@amd.com> (raw)
In-Reply-To: <8ded350c-fc05-4bc2-aff2-33b440f6e2d6@paulmck-laptop>
On 4/24/2025 1:26 AM, Paul E. McKenney wrote:
> On Wed, Apr 23, 2025 at 09:19:56PM +0200, Bert Karwatzki wrote:
>> Am Mittwoch, dem 23.04.2025 um 11:07 -0700 schrieb Paul E. McKenney:
>>> On Wed, Apr 23, 2025 at 08:49:08PM +0530, Aithal, Srikanth wrote:
>>>> On 4/23/2025 7:48 PM, Paul E. McKenney wrote:
>>>>> On Wed, Apr 23, 2025 at 07:09:42PM +0530, Aithal, Srikanth wrote:
>>>>>> On 4/23/2025 5:24 PM, Bert Karwatzki wrote:
>>>>>>> Since linux next-20250422 booting fails on my MSI Alpha 15 Laptop runnning
>>>>>>> debian sid. When booting kernel message appear on screen but no messages from
>>>>>>> init (systemd). There are also no logs written even thought emergency sync
>>>>>>> via magic sysrq works (a message is printed on screen), presumably because
>>>>>>> / is not mounted. I bisected this (from 6.15-rc3 to next-20250422) and found
>>>>>>> commit dd4cf8c9e1f4 as the first bad commit.
>>>>>>> Reverting commit dd4cf8c9e1f4 in next-20250422 fixes the issue.
>>>>>>
>>>>>>
>>>>>> Hello,
>>>>>>
>>>>>> On AMD platform as well boot failed starting next-20250422, bisecting the
>>>>>> issue led me to same commit dd4cf8c9e1f4. I have attached kernel config and
>>>>>> logs.
>>>>>
>>>>> Thank you all for the bisection and the report!
>>>>>
>>>>> Please check out the predecessor of commit dd4cf8c9e1f4 ("ratelimit:
>>>>> Force re-initialization when rate-limiting re-enabled"):
>>>>>
>>>>> 13fa70e052dd ("ratelimit: Allow zero ->burst to disable ratelimiting")
>>>>>
>>>>> Then please apply the patch shown below, and let me know what happens?
>>>>> (Yes, I should have split that commit up...)
>>>>>
>>>>> Thanx, Paul
>>>>>
>>>>> ------------------------------------------------------------------------
>>>>>
>>>>> diff --git a/lib/ratelimit.c b/lib/ratelimit.c
>>>>> index 04f16b8e24575..13ed636642270 100644
>>>>> --- a/lib/ratelimit.c
>>>>> +++ b/lib/ratelimit.c
>>>>> @@ -35,7 +35,7 @@ int ___ratelimit(struct ratelimit_state *rs, const char *func)
>>>>> unsigned long flags;
>>>>> int ret;
>>>>> - if (!interval || !burst)
>>>>> + if (interval <= 0 || burst <= 0)
>>>>> return 1;
>>>>> /*
>>>>
>>>>
>>>> I applied above patch on top of 13fa70e052dd ("ratelimit: Allow zero ->burst
>>>> to disable ratelimiting") [linux-20250423]. This is fixing the boot issue.
>>>>
>>>> Tested-by: Srikanth Aithal <sraithal@amd.com>
>>>
>>> Thank you both, and to Bert for intuiting the correct -next commit!
>>>
>>> Could you please try the next increment, which is this patch, again
>>> on top of 24ff89c63355 ("ratelimit: Allow zero ->burst to > disable
>>> ratelimiting")?
>>>
>>> In the meantime, I will expose the version you two just tested to
>>> -next.
>>>
>>> Thanx, Paul
>>>
>>> ------------------------------------------------------------------------
>>>
>>> diff --git a/lib/ratelimit.c b/lib/ratelimit.c
>>> index 04f16b8e24575..8f6c54f719ef2 100644
>>> --- a/lib/ratelimit.c
>>> +++ b/lib/ratelimit.c
>>> @@ -35,8 +35,10 @@ int ___ratelimit(struct ratelimit_state *rs, const char *func)
>>> unsigned long flags;
>>> int ret;
>>>
>>> - if (!interval || !burst)
>>> + if (interval <= 0 || burst <= 0) {
>>> + ret = burst > 0;
>>> return 1;
>>> + }
>>>
>>> /*
>>> * If we contend on this state's lock then just check if
>>
>> If you set "ret = burst > 0", but "return 1" this will make no difference
>> (except in the case of a major compiler bug, probably), as I wrote in my other
>> email which overlapped yours, this fixes the issue in next-20250422:
>>
>> diff --git a/lib/ratelimit.c b/lib/ratelimit.c
>> index b5c727e976d2..fc28f6cf8269 100644
>> --- a/lib/ratelimit.c
>> +++ b/lib/ratelimit.c
>> @@ -40,7 +40,7 @@ int ___ratelimit(struct ratelimit_state *rs, const char *func)
>> * interval says never limit.
>> */
>> if (interval <= 0 || burst <= 0) {
>> - ret = burst > 0;
>> + ret = 1;
>> if (!(READ_ONCE(rs->flags) & RATELIMIT_INITIALIZED) ||
>> !raw_spin_trylock_irqsave(&rs->lock, flags))
>> return ret;
>
> You are quite right, your patch does fix the issue that you three say.
> Unfortunately, it prevents someone from completely suppressing output
> by setting burst to zero. Could you please try the patch below?
>
> Thanx, Paul
I have tested the below patch on top of 13fa70e052dd ("ratelimit: Allow
zero ->burst to disable ratelimiting") [linux-20250423].
This is fixing the boot issue. Thanks again!
Tested-by: Srikanth Aithal <sraithal@amd.com>
>
> ------------------------------------------------------------------------
>
> diff --git a/lib/ratelimit.c b/lib/ratelimit.c
> index 04f16b8e24575..d6531e5c6ec4e 100644
> --- a/lib/ratelimit.c
> +++ b/lib/ratelimit.c
> @@ -35,8 +35,8 @@ int ___ratelimit(struct ratelimit_state *rs, const char *func)
> unsigned long flags;
> int ret;
>
> - if (!interval || !burst)
> - return 1;
> + if (interval <= 0 || burst <= 0)
> + return interval == 0 || burst > 0;
>
> /*
> * If we contend on this state's lock then just check if
next prev parent reply other threads:[~2025-04-24 4:30 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-04-23 11:54 commit dd4cf8c9e1f4 leads to failed boot Bert Karwatzki
2025-04-23 13:39 ` Aithal, Srikanth
2025-04-23 13:46 ` Steven Rostedt
2025-04-23 13:47 ` Aithal, Srikanth
2025-04-23 14:01 ` Steven Rostedt
2025-04-23 14:02 ` Steven Rostedt
2025-04-23 14:18 ` Paul E. McKenney
2025-04-23 14:59 ` Bert Karwatzki
2025-04-23 18:03 ` Bert Karwatzki
2025-04-23 15:19 ` Aithal, Srikanth
2025-04-23 18:07 ` Paul E. McKenney
2025-04-23 19:19 ` Bert Karwatzki
2025-04-23 19:56 ` Paul E. McKenney
2025-04-24 4:30 ` Aithal, Srikanth [this message]
2025-04-24 7:36 ` Petr Mladek
2025-04-24 14:43 ` Paul E. McKenney
2025-04-25 9:35 ` Petr Mladek
2025-04-25 16:34 ` Paul E. McKenney
2025-04-24 12:40 ` Bert Karwatzki
2025-04-24 14:30 ` Paul E. McKenney
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=5dbe2246-fb9d-4bc8-82a2-8cbffa913b6e@amd.com \
--to=sraithal@amd.com \
--cc=akpm@linux-foundation.org \
--cc=john.ogness@linutronix.de \
--cc=kuniyu@amazon.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-next@vger.kernel.org \
--cc=mjguzik@gmail.com \
--cc=paulmck@kernel.org \
--cc=pmladek@suse.com \
--cc=rostedt@goodmis.org \
--cc=senozhatsky@chromium.org \
--cc=spasswolf@web.de \
/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