From: Sean Christopherson <seanjc@google.com>
To: Peter Zijlstra <peterz@infradead.org>
Cc: Carlos Bilbao <bilbao@vt.edu>,
Andrew Morton <akpm@linux-foundation.org>,
carlos.bilbao@kernel.org, tglx@linutronix.de,
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: Wed, 30 Apr 2025 08:59:00 -0700 [thread overview]
Message-ID: <aBJIxJ-2Lfke1MGq@google.com> (raw)
In-Reply-To: <20250430084852.GN4198@noisy.programming.kicks-ass.net>
On Wed, Apr 30, 2025, Peter Zijlstra wrote:
> All that said... the default more or less does for(;;) { mdelay(100) },
> if you have a modern chip that should not end up using much power at
> all. That should end up in delay_halt_tpause() or delay_halt_mwaitx()
> (depending on you being on Intel or AMD). And spend most its time in
> deep idle states.
>
> Is something not working?
The motivation is to coerce vCPUs into yielding the physical CPU so that a
different vCPU can be scheduled in when the host is oversubscribed. IMO, that's
firmly a "host" problem to solve, where the solution might involve educating
customers for their own benefit[*].
I am indifferent as to whether or not the kernels halts during panic(), my
suggestions/feedback in earlier versions were purely to not make any behavior
specific to VMs. I.e. I am strongly opposed to implementing behavior that kicks
in only when running as a guest.
[*] from https://lore.kernel.org/all/Z_lDzyXJ8JKqOyzs@google.com:
: On Fri, Apr 11, 2025 at 9:31 AM Sean Christopherson <seanjc@google.com> wrote:
: > > On Wed 2025-03-26 10:12:03, carlos.bilbao@kernel.org wrote:
: > > > After handling a panic, the kernel enters a busy-wait loop, unnecessarily
: > > > consuming CPU and potentially impacting other workloads including other
: > > > guest VMs in the case of virtualized setups.
: >
: > Impacting other guests isn't the guest kernel's problem. If the host has heavily
: > overcommited CPUs and can't meet SLOs because VMs are panicking and not rebooting,
: > that's a host problem.
: >
: > This could become a customer problem if they're getting billed based on CPU usage,
: > but I don't know that simply doing HLT is the best solution. E.g. advising the
: > customer to configure their kernels to kexec into a kdump kernel or to reboot
: > on panic, seems like it would provide a better overall experience for most.
: >
: > QEMU (assuming y'all use QEMU) also supports a pvpanic device, so unless the VM
: > and/or customer is using a funky setup, the host should already know the guest
: > has panicked. At that point, the host can make appropiate scheduling decisions,
: > e.g. userspace can simply stop running the VM after a certain timeout, throttle
: > it, jail it, etc.
next prev parent reply other threads:[~2025-04-30 15:59 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-04-29 15:06 [PATCH v3 0/2] Reduce CPU consumption after panic 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
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 [this message]
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=aBJIxJ-2Lfke1MGq@google.com \
--to=seanjc@google.com \
--cc=akpm@linux-foundation.org \
--cc=bilbao@vt.edu \
--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=peterz@infradead.org \
--cc=pmladek@suse.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