Re: CONFIG_X86_PM_TIMER is slow

From: Willy Tarreau
Date: Fri Nov 12 2004 - 01:05:40 EST


On Thu, Nov 11, 2004 at 09:52:27PM -0800, dean gaudet wrote:
> when using CONFIG_X86_PM_TIMER i'm finding that gettimeofday() calls take
> 2.8us on a p-m 1.4GHz box... which is an order of magnitude slower than
> TSC-based solutions.
> on one workload i'm seeing a 7% perf improvement by booting "acpi=off" to
> force it to use tsc instead of the PM timer... (the workload calls
> gettimeofday too frequently, but i can't change that).

I did not test, this might be interesting.
In fact, what would be very good would be sort of a new select/poll/epoll
syscalls with an additional argument, which would point to a structure
that the syscall would fill in return with the time of day. This would
greatly reduce the number of calls to gettimeofday() in some programs,
and make use of the time that was used by the syscall itself.

For example, if I could call it like this, it would be really cool :

ret = select_absdate(&in, &out, &excp, &date_timeout, &return_date);

with <date_timeout> the date at which to timeout (instead of the number of
microseconds) and <return_date> the current date upon return.


To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at
Please read the FAQ at