Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 21 Sep 2010 08:02:02 +0000 (UTC)
From:      Alexander Motin <mav@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r212958 - head/sys/kern
Message-ID:  <201009210802.o8L822H2084292@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
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);



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201009210802.o8L822H2084292>