Re: finding out the value of HZ from userspace

From: Peter Williams
Date: Sat Mar 20 2004 - 20:32:59 EST


Tim Schmielau wrote:
On Sun, 21 Mar 2004, Peter Williams wrote:


In the 2.6 kernels internal timing and task statistics (for i386 systems) are now kept in milliseconds where they were previously in 1/100ths of a second. By converting these statistics to 1/100ths of a second for export to user space an order of magnitude (i.e. a factor of 10) loss of precision occurs.


No. The statistics are not a result of full bookkeeping, but simply
gained by periodically sampling the processor state. So they don't
have a precision of 1/1000th of a second anyways.

1/1000th of a second IS the internal timing precision. The issue of how tasks' CPU usage is allocated for reporting is a different matter but from a statistical viewpoint this will just effect the variance (or standard deviation) of the estimates and NOT their precision. As the number of samples the variance (or standard deviation) decrease rapidly so to all intents and purposes the statistics are accurate to the nearest 1/1000th of a second.

Peter
--
Dr Peter Williams, Chief Scientist peterw@xxxxxxxxxx
Aurema Pty Limited Tel:+61 2 9698 2322
PO Box 305, Strawberry Hills NSW 2012, Australia Fax:+61 2 9699 9174
79 Myrtle Street, Chippendale NSW 2008, Australia http://www.aurema.com

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