Re: Lockdep warnings on kexec (virtio_blk, hrtimers)

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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.




[Index of Archives]     [Reiser Filesystem Development]     [Ceph FS]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Linux FS]     [Yosemite National Park]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Device Mapper]     [Linux Media]

  Powered by Linux