On Tue, Nov 17, 2026 at 08:50:00PM +0200, Igor Velkov wrote:
On Tue, Nov 17, 2026 at 06:32:41PM +0000, Leo Yan wrote:
Could we explore a hook in the CPU hard lockup detector? Seems this module is more relevant to hard lockup rather than panic.
Yes, that fits better. The hard lockup detector reports a CPU that missed its watchdog hrtimer interrupts, so it runs with IRQs masked and is not in an idle powerdown. The backtrace request then names the CPUs that did not answer ("these CPUS still haven't responded"). I would sample PCSR only for those, from a hook at that point, and leave the panic notifier alone. Does that sound right?
Yes, sampling CPUs that do not respond to the backtrace request sounds reasonable.
The hard lockup detector can also call panic(), so we should avoid a second dump from the panic notifier. After hook with hard-lockup diagnosis, then makes sense to remove that panic notifier.
For CPU power state, could we take a cautious approach in the driver?
1) If idle_cpu(cpu) == 0, sample the CPU directly. 2) If idle_cpu(cpu) == 1, follow the existing flow to request power-up before sampling. 3) Consider adding a module parameter, such as skip_idle, for hardware that doesn't support or honour EDPRCR_COREPURQ. This would allow the driver to sample only active CPUs.
Thanks, Leo