Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 2 Jul 1998 01:21:07 -0700 (PDT)
From:      sos@FreeBSD.ORG
To:        nick.hibma@jrc.it
Cc:        hackers@FreeBSD.ORG
Subject:   Re: Console driver (was: Problems with irq 9(2)?)
Message-ID:  <199807020821.BAA02826@hub.freebsd.org>
In-Reply-To: <Pine.GSO.3.95q.980702085902.16968d-100000@elect8> from Nick Hibma at "Jul 2, 98 09:07:54 am"

next in thread | previous in thread | raw e-mail | index | archive | help
In reply to Nick Hibma who wrote:
> Seeing the message below I just wanted to post a quick remark about the
> console driver in 2.2.1 (and looking at the source code in syscons.c
> this is still in there in 3.0-SNAP):
> 
> Start a utility like top and move the mouse. Wildly. You'll see that the
> CPU usage goes up to 20 percent on an AMD K6-166. A bit much for a
> mouse, isn't it, even if the mouse is made by Microsoft. :-) 

Hmm, I can raise my CPU usage about 2% on my 133P5, you must be
doing something strange ????

> The CPU usage comes from:
> 
> #if 1 
>     while (!(inb(crtc_addr+6) & 0x08)) /* wait for vertical retrace */ ;
> #endif
> 
> Isn't there a way to check in which vertical line the graphical
> processor is working and then do a tsleep until it arrives at line
> number max-2 and _then_ start to do this idle loop?
> 
> Or, much better, use an int routine called by the vertical retrace that
> is mentioned in the message below.

Hmm, there really is no good way to do this (or it would have been done).
The resolution of tsleep is to coarse to be usefull here. The interrupt
doesn't work on alot of cards. But on most modern cards you dont even
need this wait, they will work fine without.

> Or, maybe I should stick my head in a bucket of water and not pose
> problems that do not need to be solved.

Hmm, thats so final somehow, but thinking before posting might
be good advise :)

-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
Soren Schmidt             (sos@FreeBSD.org)             FreeBSD Core Team
               So much code to hack -- so little time.

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?199807020821.BAA02826>