svn commit: r212958 - head/sys/kern

Alexander Motin mav at FreeBSD.org
Tue Sep 21 08:02:02 UTC 2010


Author: mav
Date: Tue Sep 21 08:02:02 2010
New Revision: 212958
URL: http://svn.freebsd.org/changeset/base/212958

Log:
  Until hardclock() and respectively tc_windup() called first time, system
  is running on "dummy" time counter. But to function properly in one-shot
  mode, event timer management code requires working time counter. Slow
  moving "dummy" time counter delays first hardclock() call by few seconds
  on my systems, even though timer interrupts were correctly kicking kernel.
  That causes few seconds delay during boot with one-shot mode enabled.
  
  To break this loop, explicitly call tc_windup() first time during
  initialization process to let it switch to some real time counter.

Modified:
  head/sys/kern/kern_tc.c

Modified: head/sys/kern/kern_tc.c
==============================================================================
--- head/sys/kern/kern_tc.c	Tue Sep 21 07:58:47 2010	(r212957)
+++ head/sys/kern/kern_tc.c	Tue Sep 21 08:02:02 2010	(r212958)
@@ -805,6 +805,7 @@ inittimecounter(void *dummy)
 	/* warm up new timecounter (again) and get rolling. */
 	(void)timecounter->tc_get_timecount(timecounter);
 	(void)timecounter->tc_get_timecount(timecounter);
+	tc_windup();
 }
 
 SYSINIT(timecounter, SI_SUB_CLOCKS, SI_ORDER_SECOND, inittimecounter, NULL);


More information about the svn-src-head mailing list