ACPI slowdown...

Tony Hoyle (tmh@magenta-netlogic.com)
Wed, 07 Feb 2001 17:54:12 +0000


I've been trying to track down what makes ACPI kill the system in 2.4.1.

In the acpi_idle function (drivers/acpi/cpu.c), it seems to spend most
of its time with interrupts disabled, only enabling them to check
need_resched occasionally.

In the 'sleep1' state the following code is executed:

for (;;) {
unsigned long time;
unsigned long diff;

__cli();
if (current->need_resched)
goto out;
time = acpi_read_pm_timer();
safe_halt();
diff = acpi_compare_pm_timers(time, acpi_read_pm_timer());
if (diff > acpi_c2_enter_latency
&& acpi_max_c_state >= 2)
goto sleep2;
}

This looks wrong to me. It's basically looping with interrupts
disabled. I can't see how current->need_resched could be updated at
all, so the loop will only terminate when the PM timer tells it to.

Isn't disabling interrupts a bad thing anyway? Wouldn't it be better to
leave them enabled (this is uniprocessor only so there shouldn't be
concurrency issues).

Tony

-- 

The only secure computer is one that's unplugged, locked in a safe, and buried 20 feet under the ground in a secret location... and i'm not even too sure about that one"--Dennis Huges, FBI.

tmh@magenta-netlogic.com

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