Lockdep warnings on kexec (virtio_blk, hrtimers)
Thomas Gleixner
tglx at linutronix.de
Fri Dec 13 05:13:36 PST 2024
On Fri, Dec 13 2024 at 12:20, Peter Zijlstra wrote:
> 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.
Makes sense. Let me write a real patch.
Thanks,
tglx
More information about the kexec
mailing list