Date: Mon, 14 Dec 2009 12:23:46 +0000 (UTC) From: Luigi Rizzo <luigi@FreeBSD.org> To: cvs-src-old@freebsd.org Subject: cvs commit: src/sys/kern kern_timeout.c Message-ID: <200912141223.nBECNva8083480@repoman.freebsd.org>
index | next in thread | raw e-mail
luigi 2009-12-14 12:23:46 UTC
FreeBSD src repository
Modified files:
sys/kern kern_timeout.c
Log:
SVN rev 200510 on 2009-12-14 12:23:46Z by luigi
Properly fix callout handling by putting all the per-cpu info in
struct callout_cpu. From the comment in the file:
+ * There is one struct callout_cpu per cpu, holding all relevant
+ * state for the callout processing thread on the individual CPU.
+ * In particular:
+ * cc_ticks is incremented once per tick in callout_cpu().
+ * It tracks the global 'ticks' but in a way that the individual
+ * threads should not worry about races in the order in which
+ * hardclock() and hardclock_cpu() run on the various CPUs.
+ * cc_softclock is advanced in callout_cpu() to point to the
+ * first entry in cc_callwheel that may need handling. In turn,
+ * a softclock() is scheduled so it can serve the various entries i
+ * such that cc_softclock <= i <= cc_ticks .
Together with a smaller patch committed in september, this fixes a
bug that affects 8.0 with apps that rely on callouts to fire exactly
in the number of ticks specified (qemu among them).
Right now, callouts in 8.0 fire one tick late.
This was discussed in september with JeffR and jhb
MFC after: 3 days
Revision Changes Path
1.120 +22 -3 src/sys/kern/kern_timeout.c
help
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200912141223.nBECNva8083480>
