select() returning early from timeouts ? (on qemu, HEAD and RELENG_8)

From: Luigi Rizzo <rizzo_at_iet.unipi.it>
Date: Sat, 26 Dec 2009 16:46:04 +0100
Hi,
while doing some tests with picobsd images on qemu, i noticed
that "ping" runs too fast (approx every 0.4s instead of 1s)
Upon investigation, the problem seems related to
	retval =  select(..., &timeout)
returning a retval of 0 way before the timeout has elapsed
(at least, according to a gettimeofday which is run right after).

My host system is FreeBSD 7.2-stable i386 with qemu.
In the guest (which is built using picobsd 'bridge') i set
	kern.timecounter.hardware=i8254
A guest based on RELENG_7 works fine, whereas HEAD and RELENG_8
exhibit the problem.
Easy way to check:

	time ping -c 21 localhost
(or, on picobsd "date; ping -c 21 localhost; date" )

you should see a real time of 20 seconds (I see 8s on my system).

I was wondering if someone can try the above on real hardware
and let me know.

Even if just related to qemu or some ACPI/timecounter config, it
would be good to know where this comes from.

BTW I don't think this is related to the bug reported in september
of timeouts firing one tick late.

I am going to try various HEAD versions to see where the issue came
out, but it might be a bit time-consuming so if you have suggestions
on possible causes I'd be glad to know.

thanks
luigi
Received on Sat Dec 26 2009 - 14:38:23 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:39:59 UTC