Re: [PATCH 9/9] ia64: VIRT_CPU_ACCOUNTING (accurate cpu time accounting)

From: Peter Chubb <>
Date: 2007-10-17 13:35:05
>>>>> "Hidetoshi" == Hidetoshi Seto <> writes:

>> [9/9] ia64_acct_get_vtime.patch
Hidetoshi> Now all check points are ready.

Hidetoshi> We already cumulate cycles for stime/utime on kernel
Hidetoshi> entrance/exit, so what we need to do is reflecting them
Hidetoshi> into stime/utime of the thread, after translating cycles to
Hidetoshi> nsec.

This patchset duplicates some of the Microstate Accounting patchset
(which attempts to keep track of time spent in various states for each
thread).  As such I've had some experience trying to do this stuff.
  Things to watch are:
 -- With Montvale and later, the processor clock speed can be
    varied via ACPI.  Does ITC rate change?  In additon, KVM can
    virtualise ITC (although it doesn't at present)
 -- ITC is not synchronised across multiple processors.  I don't think
    this'll be an issue for you as you're only measuring time on-cpu,
    and migration necessarily goes via a run queue.
 -- Adding ACCOUNT_SYS_ENTER adds around 40 cycles to the system
    call path.  If you wanted, you could move reading ITC earlier (it
    takes up to 36 cycles), and overlap with other work.

Peter C
Dr Peter Chubb  peterc AT           ERTOS within National ICT Australia
To unsubscribe from this list: send the line "unsubscribe linux-ia64" in
the body of a message to
More majordomo info at
Received on Wed Oct 17 14:06:29 2007

This archive was generated by hypermail 2.1.8 : 2007-10-17 14:06:45 EST