Re: [Lse-tech] [patch 2.6.0-test1] per cpu times

From: Peter Chubb (
Date: Sun Jul 20 2003 - 23:47:45 EST

>>>>> "Mike" == Mike Kravetz <> writes:

Mike> On Fri, Jul 18, 2003 at 06:35:42PM +0200, Erich Focht wrote:
>> This patch brings back the per CPU user & system times which one
>> was used to see in /proc/PID/cpu with 2.4 kernels. Useful for SMP
>> and NUMA scheduler development, needed for reasonable output in
>> numabench / numa_test.

Mike> On a somewhat related note ...

Mike> We (Big Blue) have a performance reporting application that
Mike> would like to know how long a task sits on a runqueue before it
Mike> is actually given the CPU. In other words, it wants to know how
Mike> long the 'runnable task' was delayed due to contention for the
Mike> CPU(s). Of course, one could get an overall feel for this based
Mike> on total runqueue length. However, this app would really like
Mike> this info on a per-task basis.

Mike> Does anyone else think this type of info would be useful?

This is exactly what my microstate accounting patch does.

Per task figures for:
    -- how long on CPU
    -- how long on active queue
    -- how long on expired queue
    -- how long sleeping for paging
    -- how long sleeping in other non-interruptible state
    -- how long sleeping interruptibly
    -- how much time stolen for interrupts
    -- how long in system call
    -- how long sleeping on Futex
    -- how long sleeping for epoll, poll or select

I haven't yet added time spent handling traps, so the ONCPU time
includes pagefault and other trap time; also I've implemented the low
level timers only for X86 and IA64. It'd be pretty trivial to add
other architectures.

The most recent published version of the patch is at
(that one doesn't include all the states I mentioned, but the on-queue
times *are* counted)

There'll be another patch with more states soon.

Dr Peter Chubb  peterc AT
You are lost in a maze of BitKeeper repositories,   all slightly different.
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to
More majordomo info at
Please read the FAQ at

This archive was generated by hypermail 2b29 : Wed Jul 23 2003 - 22:00:42 EST