mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Carlos Bilbao <bilbao@vt.edu>
To: Andrew Morton <akpm@linux-foundation.org>
Cc: carlos.bilbao@kernel.org, tglx@linutronix.de, seanjc@google.com,
	jan.glauber@gmail.com, pmladek@suse.com, jani.nikula@intel.com,
	linux-kernel@vger.kernel.org, gregkh@linuxfoundation.org,
	takakura@valinux.co.jp, john.ogness@linutronix.de,
	x86@kernel.org
Subject: Re: [PATCH v3 0/2] Reduce CPU consumption after panic
Date: Tue, 29 Apr 2025 16:39:22 -0500	[thread overview]
Message-ID: <8e02de22-aaa0-413e-91fe-534d4a74c4e7@vt.edu> (raw)
In-Reply-To: <20250429155329.73bd3f5835e8d6a2864873f9@linux-foundation.org>

Hey Andrew,

On 4/29/25 17:53, Andrew Morton wrote:
> On Tue, 29 Apr 2025 15:17:33 -0500 Carlos Bilbao <bilbao@vt.edu> wrote:
> 
>> Hey Andrew,
>>
>> On 4/29/25 15:39, Andrew Morton wrote:
>>> (cc more x86 people)
>>>
>>> On Tue, 29 Apr 2025 10:06:36 -0500 carlos.bilbao@kernel.org wrote:
>>>
>>>> From: Carlos Bilbao <carlos.bilbao@kernel.org>
>>>>
>>>> Provide a priority-based mechanism to set the behavior of the kernel at
>>>> the post-panic stage -- the current default is a waste of CPU except for
>>>> cases with console that generate insightful output.
>>>>
>>>> In v1 cover letter [1], I illustrated the potential to reduce unnecessary
>>>> CPU resources with an experiment with VMs, reducing more than 70% of CPU
>>>> usage. The main delta of v2 [2] was that, instead of a weak function that
>>>> archs can overwrite, we provided a flexible priority-based mechanism
>>>> (following suggestions by Sean Christopherson), panic_set_handling().
>>>>
>>>
>>> An effect of this is that the blinky light will never again occur on
>>> any x86, I think?  I don't know what might the effects of changing such
>>> longstanding behavior.
>>
>> Yep, someone pointed this out before. I don't think it's super relevant? 
> 
> Why not?  It's an alteration in very longstanding behavior - nobody
> knows who will be affected by this and how they will be affected.

It’s difficult for me to imagine how someone might be negatively impacted,
but I understand that it could happen.

> 
>> Also, in the second patch, I added a check to see that there's no console
>> output left to be flushed.
> 
> It's unclear how this affects such considerations.  Please fully
> changelog all these things.
> 
>>
>>>
>>> Also, why was the `priority' feature added?  It has no effect in this
>>> patchset.
>>>
>>
>> This was done to allow for flexibility, for example, if panic devices
>> wish to override the default panic behavior.
> 
> There are no such callers.  We can add this feature later, if a need is
> demonstrated.

I think you'd then prefer what I originally proposed:

https://lore.kernel.org/lkml/20250326151204.67898-1-carlos.bilbao@kernel.org/T/

IMHO it's true that this feature might not be necessary ATM, but as Sean
pointed out, it could be useful in the future. I don't have strong
preferences either way. Would you be happier with the current v3 approach
if we add comments to the code explaining the purpose of the priority
feature?

> 
>> Other benefits of such
>> flexibility (as opposed to, for example, a weak function that archs can
>> override) were outlined by Sean here:
>>
>> https://lore.kernel.org/lkml/20250326151204.67898-1-carlos.bilbao@kernel.org/T/#m93704ff5cb32ade8b8187764aab56403bbd2b331
> 
> Again, please fully describe these matters in changelogging and code
> comments.

Thanks,
Carlos

  reply	other threads:[~2025-04-29 23:03 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-04-29 15:06 carlos.bilbao
2025-04-29 15:06 ` [PATCH v3 1/2] panic: Allow for dynamic custom behavior " carlos.bilbao
2025-04-29 15:06 ` [PATCH v3 2/2] x86/panic: Add x86_panic_handler as default post-panic behavior carlos.bilbao
2025-04-29 20:39 ` [PATCH v3 0/2] Reduce CPU consumption after panic Andrew Morton
2025-04-29 20:17   ` Carlos Bilbao
2025-04-29 22:53     ` Andrew Morton
2025-04-29 21:39       ` Carlos Bilbao [this message]
2025-04-29 21:06   ` Peter Zijlstra
2025-04-29 20:32     ` Carlos Bilbao
2025-04-29 22:10       ` Peter Zijlstra
2025-04-29 20:52         ` Carlos Bilbao
2025-04-30  8:48           ` Peter Zijlstra
2025-04-30 15:59             ` Sean Christopherson
2025-04-30 18:54             ` Carlos Bilbao
2025-05-01  8:55               ` Peter Zijlstra
2025-05-07 19:49                 ` Carlos Bilbao

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=8e02de22-aaa0-413e-91fe-534d4a74c4e7@vt.edu \
    --to=bilbao@vt.edu \
    --cc=akpm@linux-foundation.org \
    --cc=carlos.bilbao@kernel.org \
    --cc=gregkh@linuxfoundation.org \
    --cc=jan.glauber@gmail.com \
    --cc=jani.nikula@intel.com \
    --cc=john.ogness@linutronix.de \
    --cc=linux-kernel@vger.kernel.org \
    --cc=pmladek@suse.com \
    --cc=seanjc@google.com \
    --cc=takakura@valinux.co.jp \
    --cc=tglx@linutronix.de \
    --cc=x86@kernel.org \
    /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

all inboxes | Powered by JetHome®