From owner-freebsd-stable Wed Jun 28 11:13:15 2000 Delivered-To: freebsd-stable@freebsd.org Received: from relay01.chello.nl (smtp.chello.nl [212.83.68.144]) by hub.freebsd.org (Postfix) with ESMTP id DC15C37BFB3; Wed, 28 Jun 2000 11:13:09 -0700 (PDT) (envelope-from wkb@chello.nl) Received: from chello.nl ([213.46.78.184]) by relay01.chello.nl (InterMail vK.4.02.00.00 201-232-116 license 2ee4e7c625482f2f2a1950a80f6c8d58) with ESMTP id <20000628181357.FBMT159.relay01@chello.nl>; Wed, 28 Jun 2000 20:13:57 +0200 Received: (from wkb@localhost) by chello.nl (8.9.3/8.9.3) id UAA01205; Wed, 28 Jun 2000 20:12:59 +0200 (CEST) (envelope-from wkb) Date: Wed, 28 Jun 2000 20:12:59 +0200 From: Wilko Bulte To: Bob Willcox Cc: Greg Lehey , wilko@FreeBSD.ORG, freebsd-stable@FreeBSD.ORG Subject: Re: microuptime() going backwards Message-ID: <20000628201259.C1136@freebie.wbnet> Reply-To: wilko@FreeBSD.ORG References: <20000626225629.A525@freebie.wbnet> <20000627120348.B5328@sydney.worldwide.lemis.com> <20000627082648.A3475@freebie.wbnet> <20000628121611.C1504@sydney.worldwide.lemis.com> <20000628084749.A84134@luke.immure.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2i In-Reply-To: <20000628084749.A84134@luke.immure.com>; from bob@luke.immure.com on Wed, Jun 28, 2000 at 08:47:49AM -0500 X-OS: FreeBSD 4.0-STABLE X-PGP: finger wilko@freebsd.org Sender: owner-freebsd-stable@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG On Wed, Jun 28, 2000 at 08:47:49AM -0500, Bob Willcox wrote: > On Wed, Jun 28, 2000 at 12:16:12PM +1000, Greg Lehey wrote: > > On Tuesday, 27 June 2000 at 8:26:49 +0200, Wilko Bulte wrote: > > > On Tue, Jun 27, 2000 at 12:03:49PM +1000, Greg Lehey wrote: > > >> On Monday, 26 June 2000 at 22:56:29 +0200, Wilko Bulte wrote: > > >>> I just got tons and tons of > > >>> > > >>> Jun 26 22:06:33 freebie /kernel: microuptime() went backwards (18951.226366 -> 1 8951,199762) > > >>> Jun 26 22:06:34 freebie /kernel: microuptime() went backwards (18951.226366 -> 1 8951,210275) > > >>> > > >>> (approx 10Mb worth of them). This was during a mpeg video playing operation. > > >>> > > >>> FreeBSD freebie.wbnet 4.0-STABLE FreeBSD 4.0-STABLE #2: Sat Jun 24 16:52:41 CEST 2000 root@freebie.wbnet:/usr/src/sys/compile/FREEBIE i386 > > >>> > > >>> System is an Athlon 700Mc, dmesg.boot available if required. > > >>> > > >>> Any idea what is causing this? > > >> > > >> Yup. Is this an Epox board? I think it's a bug in the APM code. It > > >> even bites if APM is disabled. Try completely removing APM from the > > >> kernel. > > > > > > No, it is an Abit KA7. But I will try removing apm, it is indeed in the > > > kernel. I'll see what happens next. Why does apm influence the time stuff? > > > > It changes the way the timer code works. I've been told various > > things, and have quoted some of them in the past, but it seems they > > may be wrong. As far as I can tell now, the issue is that > > microuptime() is not atomic, and it seems that it's possible for race > > conditions to arise where it's called reentrantly and returns the > > older time after returning a newer time. If this hypothesis is > > correct, you should also be able to eliminate the messages by putting > > a splhigh() around the body of microuptime() (in /sys/kern/kern_tc.c). > > This isn't the solution though, especially since we're removing spls > > with the new SMP code. > > I just tried the splhigh() around microuptime() on my system here with > this problem and it did not solve the problem. Removal of apm from > the kernel seems to have, though. Note that this is an Abit KA7 board > with a 700MHz Athlon CPU. Also, I have another system here with a OK, same board/CPU here. > similar configuration (same Abit board but with a 800MHz CPU in it and > a SCSI disk vs. IDE) that doesn't suffer from this problem (with apm > installed). Mine is SCSI-only, Adaptec 2940UW based. So there is no relation with the disksubsystem type. -- Wilko Bulte http://www.freebsd.org "Do, or do not. There is no try" wilko@freebsd.org http://www.nlfug.nl Yoda - The Empire Strikes Back To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-stable" in the body of the message