Messages in this thread | | | Date | Thu, 29 Jul 1999 00:14:18 +0200 | From | Jamie Lokier <> | Subject | Re: PATCH: POSIX 1003.1b timer minor fixes |
| |
Robert de Vries wrote: > Reading the i386 TSC probably takes less time than a system call.
The i386 TSC gives the wrong answers in the presence of APM and eventually ACPI, due to slowing the clock to save power. I think the kernel doesn't do any better yet, but with ACPI it has greater control and so gettimeofday() might just work even with power management.
To argue against myself, it's possible on later x86s to disable user-space TSC, so it would be possible to trap the rdtsc instruction when the clock is slowed and substitute a suitably faked up value. That would only slow the execution path when the clock is slowed for power management -- at full speed it would be very fast.
To argue conversely again... can you have processors with different internal clocks (speed & value) in an SMP system?
-- Jamie
- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.rutgers.edu Please read the FAQ at http://www.tux.org/lkml/
| |