[PATCH v2 05/10] um: Determine sleep based on need_resched()

Tiwei Bie tiwei.bie at linux.dev
Thu Sep 11 17:54:28 PDT 2025


On Thu, 11 Sep 2025 11:27:04 +0200, Johannes Berg wrote:
> On Sun, 2025-08-10 at 13:51 +0800, Tiwei Bie wrote:
> > 
> >  void um_idle_sleep(void)
> >  {
> > -	if (time_travel_mode != TT_MODE_OFF)
> > +	if (time_travel_mode != TT_MODE_OFF) {
> >  		time_travel_sleep();
> > -	else
> > +	} else {
> > +		raw_local_irq_enable();
> >  		os_idle_sleep();
> > +		raw_local_irq_disable();
> > +	}
> 
> This seems wrong, with it, lockdep gets really unhappy, and if I remove
> this change it seems to work OK?
> 
> I'll note that arch_cpu_idle() for x86 also doesn't change anything with
> interrupts.

Thanks for catching that! I missed it. I'll take a closer look.

Regards,
Tiwei



More information about the linux-um mailing list