Re: [GIT PULL] scheduler changes for v3.3

From: Linus Torvalds
Date: Fri Jan 06 2012 - 13:01:13 EST


On Fri, Jan 6, 2012 at 9:30 AM, Frederic Weisbecker <fweisbec@xxxxxxxxx> wrote:
> On Fri, Jan 06, 2012 at 08:58:55AM -0800, Linus Torvalds wrote:
>>
>> Guys, can you take a look? Also double-check my resolve of the
>> set_cpu_sd_state_idle() call in kernel/time/tick-sched.c, please. I've
>> pushed it out, and it seems to work for me, but...
>
> Yes looks good. We want it to be called from idle loop entry but not
> from idle interrupts. So moving it to tick_nohz_idle_enter() is the
> right thing.

So I was pretty sure about that part, but not about *where* in
tick_nohz_idle_enter() it needed to be.

In particular, is it ok to be in the irq-enabled area at the top? It
looked to me like it was - all it needs is preemption disabled which I
*assume* is always true ("enter idle" doesn't seem to make sense
unless it is), but quite frankly, I don't know the code that well. So
I was going by "this seems to be ok without irqs disabled, and if so,
it's better to do it outside the irq-disabled region".

But I'd like somebody who knows the code. Because especially now that
I look at it again, I realize that the old tick_nohz_stop_sched_tick()
used to have irqs disabled and an interrupt could come in and move us
out of idle, so maybe my original thinking when I did the merge was
just totally bogus.

Linus
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/