Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 2 Jul 1998 13:59:19 +0200 (MET DST)
From:      Luigi Rizzo <luigi@labinfo.iet.unipi.it>
To:        smoergrd@oslo.geco-prakla.slb.com (Dag-Erling Coidan Smørgrav)
Cc:        sos@FreeBSD.ORG, nick.hibma@jrc.it, hackers@FreeBSD.ORG
Subject:   Re: timeout granularity (was: Re: Console driver...)
Message-ID:  <199807021159.NAA12433@labinfo.iet.unipi.it>
In-Reply-To: <rx4emw42ya6.fsf@oslo.geco-prakla.slb.com> from "Dag-Erling Coidan Smørgrav" at Jul 2, 98 03:10:54 pm

next in thread | previous in thread | raw e-mail | index | archive | help
> > the code might check if HZ is set to a suitable value (how large,
> > e.g. 1000 or 2000, i have no idea) and use timeout instead of
> > polling if the test is successful. Sooner or later hopefully we
> > will move to large values of HZ anyways.
> > 
> > (or, how about adding a utimeout() call to the kernel :)
> 
> It's not that simple. You have to know how long to wait, which is
> practically impossible to do without hooking the timer interrupt and
> reprogramming it to keep pace with the retrace, and even that is
> difficult to achieve without a little busy-waiting here and there.

a little busy waiting is not a lot. What is bad is 10ms waiting
(I hope interrupts are enabled while waiting!)

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...).

	cheers
-----------------------------+--------------------------------------
Luigi Rizzo                  |  Dip. di Ingegneria dell'Informazione
email: luigi@iet.unipi.it    |  Universita' di Pisa
tel: +39-50-568533           |  via Diotisalvi 2, 56126 PISA (Italy)
fax: +39-50-568522           |  http://www.iet.unipi.it/~luigi/
_____________________________|______________________________________

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-hackers" in the body of the message



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199807021159.NAA12433>