[TEST/REVIEW] CPU accounting patches

Peter Jeremy PeterJeremy at optushome.com.au
Wed Jan 25 13:37:56 PST 2006

On Wed, 2006-Jan-25 20:09:54 +0100, Poul-Henning Kamp wrote:
>We are therefore forced to try to divine the intent behind the text,
>and as somebody who were around back in the eighties I can testify
>that the intent was to be able to bill computer users for CPU

This implies that RDTSC (and equivalents) would be the best source of
accounting information, with CPU usage billed in CPU cycles used.
It's just users who expect to be billed in seconds.

>These days with variable clockrate, the cpu second is a bad approximation.


>If my CPU runs at 600MHz, even if used 100%, it can still do three times
>as much work, so the fact that my process takes 3 seconds to complete
>does not mean that I have used (in the sense of denying other users the
>ability to use) all of the CPU for three seconds.

This depends on why the CPU was running at 600MHz instead of 1800MHz.
If the user requested that speed (for whatever reason), then that user
_was_ denying other users the ability to use the CPU.

Peter Jeremy

More information about the freebsd-current mailing list