It\'s just a kernel thread that accumulates all time that is not beeing claimed by any other processes, i.e. when the system is idle and there\'s no processes in a run queue.
Here\' s snipset from collie_apm.c that runs inside indefinite loop that you see as \"kapm-idled\" kernel thread:
for (;;) {
/* Nothing to do, just sleep for the timeout */
timeout = 2*timeout;
if (timeout > APM_CHECK_TIMEOUT)
timeout = APM_CHECK_TIMEOUT;
schedule_timeout(timeout);
if (exit_kapmd)
break;
/*
* Ok, check all events, check for idle (and mark us sleeping
* so as not to count towards the load average)..
*/
set_current_state(TASK_INTERRUPTIBLE);
apm_event_handler();
#ifdef CONFIG_APM_CPU_IDLE
if (!system_idle())
continue;
if (apm_do_idle()) {
unsigned long start = jiffies;
while ((!exit_kapmd) && system_idle()) {
apm_do_idle();
if ((jiffies - start) > APM_CHECK_TIMEOUT) {
apm_event_handler();
start = jiffies;
}
}
apm_do_busy();
apm_event_handler();
timeout = 1;
}
#endif
}
As you can see, we just call apm_do_idle(void) if we have nothing else to do. All the time spent in there is accounted to \"kapm-idled\" thread.
I don\'t know how Qtopia calculates inactivity timeout, maybe by measuring time since last key pressed/released and touch-screen events? Just a guess...
-albertr