From owner-freebsd-hackers Thu Jul 2 07:56:37 1998 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id HAA05032 for freebsd-hackers-outgoing; Thu, 2 Jul 1998 07:56:37 -0700 (PDT) (envelope-from owner-freebsd-hackers@FreeBSD.ORG) Received: from labinfo.iet.unipi.it (labinfo.iet.unipi.it [131.114.9.5]) by hub.freebsd.org (8.8.8/8.8.8) with SMTP id HAA05025; Thu, 2 Jul 1998 07:56:27 -0700 (PDT) (envelope-from luigi@labinfo.iet.unipi.it) Received: from localhost (luigi@localhost) by labinfo.iet.unipi.it (8.6.5/8.6.5) id PAA12564; Thu, 2 Jul 1998 15:26:11 +0200 From: Luigi Rizzo Message-Id: <199807021326.PAA12564@labinfo.iet.unipi.it> Subject: Re: timeout granularity (was: Re: Console driver...) To: smoergrd@oslo.geco-prakla.slb.com (Dag-Erling Coidan Smørgrav) Date: Thu, 2 Jul 1998 15:26:10 +0200 (MET DST) Cc: sos@FreeBSD.ORG, nick.hibma@jrc.it, hackers@FreeBSD.ORG In-Reply-To: from "Dag-Erling Coidan Smørgrav" at Jul 2, 98 03:33:48 pm X-Mailer: ELM [version 2.4 PL23] Content-Type: text Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG > With a 70 Hz refresh rate, we're talking more like 14 ms in the worst > case, which is pretty darn bad. > > > If one can, say, assume that the vertical retrace is never less than > > 1ms, then HZ=2000 should do the job (wakeup at every tick...). > > Ah, I didn't think of it quite like that. Yes, it would work, and you > wouldn't have to busy-wait at all; just wake up at every tick, check > if you're in a retrace, and if you are, do your job. actually, if you could only know how far away you are from the retrace (perhaps by reading some status register ?) you could even tolerate a coarser timer. luigi To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message