From owner-freebsd-hackers Fri Aug 31 12:40:35 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 3A53A37B40B; Fri, 31 Aug 2001 12:40:04 -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 VAA35839; Fri, 31 Aug 2001 21:39:44 +0200 (CEST) Message-Id: <200108311939.VAA35839@midten.fast.no> To: bde@zeta.org.au Cc: mb@imp.ch, bkarp@icsi.berkeley.edu, kpielorz@tdx.co.uk, sthaug@nethelp.no, atrn@zeta.org.au, roberto@eurocontrol.fr, drussell@saturn-tech.com, phk@FreeBSD.ORG, Patrick.Guelat@imp.ch, freebsd-hackers@FreeBSD.ORG, freebsd-smp@FreeBSD.ORG Subject: Re: Clock speedup on 4.X FreeBSD SMP and serverworks chipset From: Tor.Egge@fast.no In-Reply-To: Your message of "Sat, 1 Sep 2001 05:08:38 +1000 (EST)" References: <20010901044125.V5017-100000@besplex.bde.org> 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:39:44 +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 > I see (amost). > > Please format the macro the same as the other macros in the file. Index: apic_vector.s =================================================================== RCS file: /home/ncvs/src/sys/i386/isa/apic_vector.s,v retrieving revision 1.47.2.4 diff -u -r1.47.2.4 apic_vector.s --- apic_vector.s 18 Jul 2000 21:12:41 -0000 1.47.2.4 +++ apic_vector.s 31 Aug 2001 19:24:24 -0000 @@ -653,7 +707,14 @@ FAST_INTR(21,fastintr21) FAST_INTR(22,fastintr22) FAST_INTR(23,fastintr23) -#define CLKINTR_PENDING movl $1,CNAME(clkintr_pending) + +#define CLKINTR_PENDING \ + pushl $clock_lock; \ + call s_lock; \ + movl $1,CNAME(clkintr_pending); \ + call s_unlock; \ + addl $4, %esp + INTR(0,intr0, CLKINTR_PENDING) INTR(1,intr1,) INTR(2,intr2,) > > > The corresponding patch for -current is > > This does nothing for -current, because -current uses a fast interrupt > handler for clkintr() and FAST_INTR() doesn't take a CLKINTR_PENDING > arg. I think this is another bug. Adding a CLKINTR_PENDING arg to FAST_INTR() doesn't eliminate the race where a wrong value is returned by i8254_get_timecount(). - Tor Egge To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message