]> git.baikalelectronics.ru Git - kernel.git/commit
[PATCH] x86: Don't use nested idle loops
authorAndi Kleen <ak@suse.de>
Thu, 7 Dec 2006 01:14:03 +0000 (02:14 +0100)
committerAndi Kleen <andi@basil.nowhere.org>
Thu, 7 Dec 2006 01:14:03 +0000 (02:14 +0100)
commitaeab0135e65916f1776294c1b9081c10704e83d9
tree6ddd4a04307867128100dbd1906eec5a89f88662
parentd9d693946bff7ff06f76eea8ebb046fb425ac9a8
[PATCH] x86: Don't use nested idle loops

Currently the idle loop has two nested loops -- one high level
in cpu_idle and in some low level idle functions another one.

Looping in the low level idle functions breaks the idle notifiers
because interrupts waking up sleep states need to execute
exit_idle() which is only in cpu_idle().

So don't do that, only loop in cpu_idle(). This only removes
code.

In some cases e.g. poll_idle the idle loop is a little longer
now because cpu_idle checks more things. I hope that isn't a problem
ACPI idle doesn't change behaviour because it never looped anyways.

Cc: len.brown@intel.com
Cc: eranian@hpl.hp.com
Signed-off-by: Andi Kleen <ak@suse.de>
arch/i386/kernel/process.c
arch/x86_64/kernel/process.c