From owner-freebsd-hackers Tue Feb 5 9:54: 9 2002 Delivered-To: freebsd-hackers@freebsd.org Received: from wall.polstra.com (wall-gw.polstra.com [206.213.73.130]) by hub.freebsd.org (Postfix) with ESMTP id E461C37B429 for ; Tue, 5 Feb 2002 09:53:29 -0800 (PST) Received: from vashon.polstra.com (vashon.polstra.com [206.213.73.13]) by wall.polstra.com (8.11.3/8.11.3) with ESMTP id g15HrQo53485; Tue, 5 Feb 2002 09:53:26 -0800 (PST) (envelope-from jdp@wall.polstra.com) Received: (from jdp@localhost) by vashon.polstra.com (8.11.6/8.11.0) id g15HrQh04002; Tue, 5 Feb 2002 09:53:26 -0800 (PST) (envelope-from jdp) Date: Tue, 5 Feb 2002 09:53:26 -0800 (PST) Message-Id: <200202051753.g15HrQh04002@vashon.polstra.com> To: hackers@freebsd.org From: John Polstra Cc: phk@critter.freebsd.dk Subject: Re: A question about timecounters In-Reply-To: <90498.1012930272@critter.freebsd.dk> References: <90498.1012930272@critter.freebsd.dk> Organization: Polstra & Co., Seattle, WA 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 In article <90498.1012930272@critter.freebsd.dk>, Poul-Henning Kamp wrote: > In message <200202051723.g15HNH603801@vashon.polstra.com>, John Polstra writes: > > >Agreed. But in the cases I'm worrying about right now, the > >timecounter is the TSC. > > Now, *that* is very interesting, how reproducible is it ? I can reproduce it pretty easily. This is from a PIII/550: web1# uptime 5:23PM up 37 mins, 2 users, load averages: 0.08, 0.05, 0.01 web1# dmesg | grep microuptime microuptime() went backwards (1992.7347381 -> 1991.587620) microuptime() went backwards (1992.7347381 -> 1991.620385) microuptime() went backwards (1992.7347381 -> 1991.621582) microuptime() went backwards (2016.7063298 -> 2015.272466) microuptime() went backwards (2286.7346482 -> 2285.587587) microuptime() went backwards (2286.7346482 -> 2285.593646) microuptime() went backwards (2286.7346482 -> 2285.595103) microuptime() went backwards (2286.7346482 -> 2285.617023) Now, two things are unusual about this system. First, I have it pumping packets from inside the kernel (with a special netgraph node) at a rate which is keeping the system about 95% busy processing interrupts. (That's about 330K packets/second.) That definitely makes it happen more often. But I also see it occasionally when the system is sitting idle. Second, I have HZ set to 10000. I think that also contributes to the problem. It shouldn't, though. Not even a PII/400 breathes hard at HZ=10000. On another system which is mostly idle, I see it about 4 times a day. That system also has HZ set to 10000. It's a PIII/1.13 GHz: microuptime() went backwards (200671.582473 -> 200671.582472) microuptime() went backwards (222622.358518 -> 222622.358517) microuptime() went backwards (228934.897839 -> 228934.897838) microuptime() went backwards (246166.386301 -> 246166.386300) microuptime() went backwards (263484.488575 -> 263484.488574) Notice the difference on this system that's fairly idle. On the other system, it was the seconds going backward. Here it's the microseconds. These may be two entirely different problems. > Can you try to MFC rev 1.111 and see if that changes anything ? Sure. I'll let you know. John -- John Polstra John D. Polstra & Co., Inc. Seattle, Washington USA "Disappointment is a good sign of basic intelligence." -- Chögyam Trungpa To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message