From owner-freebsd-hackers Tue Feb 5 11:44:25 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 3A1EF37B41C for ; Tue, 5 Feb 2002 11:44:19 -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 g15JiFo54196; Tue, 5 Feb 2002 11:44:15 -0800 (PST) (envelope-from jdp@wall.polstra.com) Received: (from jdp@localhost) by vashon.polstra.com (8.11.6/8.11.0) id g15JiFw04286; Tue, 5 Feb 2002 11:44:15 -0800 (PST) (envelope-from jdp) Date: Tue, 5 Feb 2002 11:44:15 -0800 (PST) Message-Id: <200202051944.g15JiFw04286@vashon.polstra.com> To: hackers@freebsd.org From: John Polstra Cc: phk@critter.freebsd.dk Subject: Re: A question about timecounters In-Reply-To: <92148.1012936551@critter.freebsd.dk> References: <92148.1012936551@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 OK, adding the splhigh() around the body of microuptime seems to have solved the problem. After 45 minutes of running the same test as before, I haven't gotten a single message. If I get one later, I'll let you know. > >I'm testing that now. But for how long would microuptime have to > >be interrupted to make this happen? Surely not 7.81 seconds! On > >this same machine I have a curses application running which is > >updating the screen once a second. It never misses a beat, and > >userland is very responsive. > > Well, that is what I don't understand yet either :-) > > The fact that the delta is not exactly 2^32 * cpu clock is probably > blindingly obviously indicative of "why", but I havn't solved the > puzzle yet... I've been staring at the code, but I haven't gotten it yet either. > Since you are running with a 10000 HZ, NTIMECOUNTER should probably > be considerably increased. (Actually it might be a good idea to > simply set NTIMECOUNTER == hz ... hmmm...) I don't follow that. As I read the code, the "current" timecounter is only advanced every second -- not every 1/HZ seconds. Why should more of them be needed when HZ is large? > You didn't say if you ran with standard NTIMECOUNTER right now, > but 5 would be awfully short time at HZ=10000: 500 usec... Well, microseconds aren't what they used to be ... :-) But isn't it true that the current timecounter only advances every second? I think I have 5 seconds, not 5/HZ seconds. 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