Well, that's exactly the problem. in apm_mainloop the following happens:
timeout = 2 * timeout;
if (timeout > APM_CHECK_TIMEOUT)
timeout = APM_CHECK_TIMEOUT;
schedule_timeout(timeout);
...
if (!system_idle())
continue;
...
if (apm_do_idle() != -1) {
...
timeout = 1;
}
This just means that after a busy condition we start at 1 and increase the
scheduling delay until the timeout reaches HZ.
system_idle itself just checks, if nr_running is 1. This means that if any
single other process is runnable every HZ time when apm_idled checks the system
state it won't switch to idle state even if the system is otherwise idle. I do
see this behaviour e.g. all the time with KDE.
Just create a process that does a select timeout every HZ and down the drain
goes your laptop battery, when the select call meets kapm-idled polling time.
Andreas Steinmetz
D.O.M. Datenverarbeitung GmbH
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/