[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
Re: [Libevent-users] Strange timeout scheduling in 1.4
On Wed, Jul 27, 2011 at 07:03:33PM -0700, William Ahern wrote:
<snip>
> However, the difference between vDSO support and no vDSO support was nothing
> compared to the OpenBSD v. Linux differences. OpenBSD system calls are
> incredibly slow compared to Linux. A million gettimeofday calls on OpenBSD
> takes 5 seconds to complete, whereas a similarly equipped Linux box
> sans-vDSO takes about 0.15 seconds. Time counter support _should_ be enabled
> on my OpenBSD box, so that's a 33x difference in syscall performance.
>
> Basically, the cost of gettimeofday() shouldn't be much of a concern to
> anybody on Linux. It _shouldn't_ be much of a concern on OpenBSD. If I
> understand the kern_tc.c implementation properly, gettimeofday() doesn't do
> any writes at all. In fact, OpenBSD appears to have modified the original
> FreeBSD Timecounter implementation so that all gettimeofday() and
> clock_gettime() calls just read the cached value from the periodic timer.
I was wrong. I totally missed the get_timecount call in
kern_tc.c:tc_delta(). Following that I can see that both the i8254 and ACPI
drivers read from the hardware. So OpenBSD is definitely suffering for it's
lack of TSC support (e.g. the SMP-safe RTSDCP on AMD64 and later Intel
chips).
***********************************************************************
To unsubscribe, send an e-mail to majordomo@xxxxxxxxxxxxx with
unsubscribe libevent-users in the body.