Re: [PATCH] Re: /proc/uptime idle counter remains at 0

From: Jan Engelhardt
Date: Mon May 11 2009 - 03:42:22 EST



On Monday 2009-05-11 09:35, Martin Schwidefsky wrote:
>> I have to confess I don't really understand the logic of what's going on
>> here -- in particular, what does the idle process do other than account
>> for time when the processor has nothing useful to do? It does seem to me
>> now that the .utime and .stime fields are now less than useful -- maybe
>> they can be deleted now?
>
>The idle task does not just sleep, it will do "real" work, e.g. softirq
>handling for interrupts / network traffic.

With an RT kernel, SIRQ and such are separate tasks. That should also
be play a role while 0 is displayed.

>> I've always assumed that the second field of /proc/uptime was a simple
>> measure of time not spent doing real work, in other words a crude measure
>> of spare CPU resources. My instrument basically uses the the two fields
>> of this file to compute a measure of CPU loading so it can raise an alert
>> if the CPU doesn't have enough spare (idle) capacity.
>
>But it wasn't.. the old style stime of idle is a mixture of true idle
>time and some system time.

Then I would say let's show the idle time only (but still inculde
the idle time when the CPU is halted).

--
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/