lkml.org 
[lkml]   [2020]   [Nov]   [30]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Date
SubjectRe: [GIT pull] locking/urgent for v5.10-rc6
On Sun, Nov 29, 2020 at 11:57 PM Peter Zijlstra <peterz@infradead.org> wrote:
>
> The idea was to flip all of arch_cpu_idle() to not enable interrupts.

I don't think that's realistic.

> This is suboptimal for things like x86 where arch_cpu_idle() is
> basically STI;HLT, but x86 isn't likely to actually use this code path
> anyway, given all the various cpuidle drivers it has.

Well, but the thing is, "enable interrupts" is pretty much fundamental
to any idle routine.

Idling with interrupts disabled is not a sensible operation. The fact
that on x86 the sequence is "sti;hlt" is not just some x86 oddity,
it's basically fundamental to the whole notion of idle.

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.

So I think it's completely misguided to think that the default idle
routine should assume that arch_cpu_idle() wouldn't enable interrupts.

Linus

\
 
 \ /
  Last update: 2020-11-30 18:57    [W:1.022 / U:0.040 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site