Lockdep warnings on kexec (virtio_blk, hrtimers)
Peter Zijlstra
peterz at infradead.org
Fri Dec 13 03:20:28 PST 2024
On Fri, Dec 13, 2024 at 01:14:54AM +0100, Thomas Gleixner wrote:
> --- a/kernel/sched/core.c
> +++ b/kernel/sched/core.c
> @@ -7276,7 +7276,7 @@ void rt_mutex_setprio(struct task_struct
> #if !defined(CONFIG_PREEMPTION) || defined(CONFIG_PREEMPT_DYNAMIC)
> int __sched __cond_resched(void)
> {
> - if (should_resched(0)) {
> + if (should_resched(0) && system_state != SYSTEM_SUSPEND) {
> preempt_schedule_common();
> return 1;
> }
Perhaps we should just do:
if (should_resched(0) && !irqs_disabled())
That's more or less what preemptible() does too. Yes, mucking about with
IF is expensive, but it's only done if preempt_count is agreeing we
should schedule, which it shouldn't be most of the time.
More information about the kexec
mailing list