Messages in this thread | | | Date | Tue, 1 Dec 2020 08:56:33 +0100 | From | Peter Zijlstra <> | Subject | Re: [GIT pull] locking/urgent for v5.10-rc6 |
| |
On Tue, Dec 01, 2020 at 08:39:06AM +0100, Peter Zijlstra wrote: > On Mon, Nov 30, 2020 at 09:55:44AM -0800, Linus Torvalds wrote: > > > Yes, yes, I can very well imagine some hardware doing a "idle until > > you sense an interrupt, but don't actually take it". It's not > > _impossible_. But it's certainly not normal. > > A lot of hardware actually does that, including modern x86. But yes, not > nearly everything.
So the thing is that (with exception of RCU-tiny), we need interrupts disabled when coming out of idle to prod RCU back into action.
So even if an architecture needs to enable interrupts on idle, we need it disabled again when coming out. So we might as well have the arch idle routine then be: STI; HLT; CLI; because then architectures than can idle with interrupts disabled can avoid mucking about with the interrupt state entirely.
Currently they (and this includes much of ARM) are effectively doing:
wfi(); raw_local_irq_enable(); raw_local_irq_disable();
where a plain: wfi(), would be sufficient.
| |