From owner-freebsd-hackers Fri Aug 31 12:15:42 2001 Delivered-To: freebsd-hackers@freebsd.org Received: from midten.fast.no (midten.fast.no [213.188.8.11]) by hub.freebsd.org (Postfix) with ESMTP id E867337B403; Fri, 31 Aug 2001 12:15:35 -0700 (PDT) Received: from fast.no (IDENT:tegge@midten.fast.no [213.188.8.11]) by midten.fast.no (8.9.3/8.9.3) with ESMTP id VAA34938; Fri, 31 Aug 2001 21:15:34 +0200 (CEST) Message-Id: <200108311915.VAA34938@midten.fast.no> To: jhb@FreeBSD.org Cc: freebsd-smp@FreeBSD.org, freebsd-hackers@FreeBSD.org, Patrick.Guelat@imp.ch, phk@FreeBSD.org, drussell@saturn-tech.com, roberto@eurocontrol.fr, atrn@zeta.org.au, sthaug@nethelp.no, kpielorz@tdx.co.uk, bkarp@icsi.berkeley.edu, bde@zeta.org.au, mb@imp.ch Subject: Re: Clock speedup on 4.X FreeBSD SMP and serverworks chipset From: Tor.Egge@fast.no In-Reply-To: Your message of "Fri, 31 Aug 2001 11:22:30 -0700 (PDT)" References: X-Mailer: Mew version 1.70 on Emacs 19.34.1 Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit Date: Fri, 31 Aug 2001 21:15:33 +0200 Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG > Hmm, does -current even need clkintr_pending anymore? What is its purpose? There is a problem if i8254_get_timecount locks clock_lock right before a rollover but reads the timer right afterwards. In that case, a too low value can be returned (resulting in 1/Hz too small time value) although the result will still be monotonous. For RELENG_4, which uses Xintr0, this problem is reduced by adding the clkintr_pending variable (cf. revision 1.134 of clock.c and revision 1.38 of apic_vector.s) Looking more at the code, I now see that clkintr_pending is never set in -current due to Xintr0 not being used (Xfastintr0 is now used). Using a fast interrupt for the clock interrupt gives some of the same reduction of the race window size as the use of clkintr_pending. - Tor Egge To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message