tech-kern archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: getrusage() problems with user vs. system time reporting
On Mon, Oct 31, 2011 at 09:10:40PM +0000, David Laight wrote:
> The problem is that getting an accurate timestamp is relatively
> expensive. It has been almost the dominant part of process switch.
Let's make this a bit less vague for X86. The numbers are from memory,
but should reflect the order of magnitude. Using TSC or LAPIC for
gettimeofday requires in the order of 100-120 cycles, including system
call overhead. Timer code is roughly half of that. Any other timer,
including HPET and ACPI-fast are above the 1000 cycle barrier and
completely inacceptable.
Joerg
Home |
Main Index |
Thread Index |
Old Index