From owner-freebsd-hackers Thu Jul 2 01:21:13 1998 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id BAA02861 for freebsd-hackers-outgoing; Thu, 2 Jul 1998 01:21:13 -0700 (PDT) (envelope-from owner-freebsd-hackers@FreeBSD.ORG) Received: (from sos@localhost) by hub.freebsd.org (8.8.8/8.8.8) id BAA02826; Thu, 2 Jul 1998 01:21:07 -0700 (PDT) (envelope-from sos) Message-Id: <199807020821.BAA02826@hub.freebsd.org> Subject: Re: Console driver (was: Problems with irq 9(2)?) In-Reply-To: from Nick Hibma at "Jul 2, 98 09:07:54 am" To: nick.hibma@jrc.it Date: Thu, 2 Jul 1998 01:21:07 -0700 (PDT) Cc: hackers@FreeBSD.ORG From: sos@FreeBSD.ORG Reply-to: sos@FreeBSD.ORG X-Mailer: ELM [version 2.4ME+ PL32 (25)] MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG 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