Skip to content

Reduce CPU consumption after panic

[email protected] lkml 3 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v3 Latest2 patches 13 repliesIn review
  2. v22 patches 8 repliesSuperseded
  3. v12 patches 5 repliesSuperseded

Patches in v3 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/2panic: Allow for dynamic custom behavior after panicinclude/linux/panic.h kernel/panic.c+24 -00 replies
2/2x86/panic: Add x86_panic_handler as default post-panic behaviorarch/x86/kernel/setup.c+17 -00 replies

Reviews trailers per patch

All 2 patches have a Reviewed-by or Acked-by.

PatchJan Glauber (DigitalOcean)
1/2R-b
2/2R-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v3 thread

Cover letter [PATCH v3 0/2] Reduce CPU consumption after panic

From: Carlos Bilbao <[email protected]>

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().

Compared to v2 [2], the main changes in this third version are that (1) we don't set a default function for panic_halt() and (2) we provide a comment for the x86 implementation describing the check for console.

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

Carlos:
panic: Allow for dynamic custom behavior after panic x86/panic: Add x86_panic_handler as default post-panic behavior

---
 arch/x86/kernel/setup.c | 17 +++++++++++++++++
 include/linux/panic.h   |  2 ++
 kernel/panic.c          | 22 ++++++++++++++++++++++
 3 files changed, 41 insertions(+)