From owner-freebsd-arch@FreeBSD.ORG Mon Feb 9 19:28:19 2004 Return-Path: Delivered-To: freebsd-arch@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 730B516A4CE for ; Mon, 9 Feb 2004 19:28:19 -0800 (PST) Received: from smtp.mho.com (smtp.mho.net [64.58.4.5]) by mx1.FreeBSD.org (Postfix) with SMTP id 5545443D1D for ; Mon, 9 Feb 2004 19:28:19 -0800 (PST) (envelope-from scottl@freebsd.org) Received: (qmail 47538 invoked by uid 1002); 10 Feb 2004 03:28:16 -0000 Received: from unknown (HELO freebsd.org) (64.58.1.252) by smtp.mho.net with SMTP; 10 Feb 2004 03:28:16 -0000 Message-ID: <40284F39.8080903@freebsd.org> Date: Mon, 09 Feb 2004 20:25:45 -0700 From: Scott Long User-Agent: Mozilla/5.0 (X11; U; FreeBSD i386; en-US; rv:1.5) Gecko/20031103 X-Accept-Language: en-us, en MIME-Version: 1.0 To: Bruce Evans References: <200402090529.i195T5KF097775@repoman.freebsd.org> <20040210112019.U50678@gamplex.bde.org> In-Reply-To: <20040210112019.U50678@gamplex.bde.org> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit cc: arch@freebsd.org Subject: Re: cvs commit: src/sys/dev/aac aac_pci.c X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 10 Feb 2004 03:28:19 -0000 [bouncing to arch@ to get more comments] On Tue, 10 Feb 2004, Bruce Evans wrote: > > scottl 2004/02/08 21:29:05 PST > > > > FreeBSD src repository > > > > Modified files: > > sys/dev/aac aac_pci.c > > Log: > > Fall back to INTR_MPSAFE if INTR_FAST registration fails. > > > > PR: kern/62276 > > This depends on losing the race to register the interrupt as INTR_FAST. > sio has the same bug, but it is less serious there because most sio > devices use unshared isa interrupts. The cy driver avoids this bug > by not trying INTR_FAST unless CY_PCI_FASTINTR is configured. (The > bug is mostly in bus_setup_intr(). Drivers cannot know at their attach > time (or even later) whether the interrupt will be shared later. The > sharedness may change back and forth as devices and drivers are plugged > in and out.) And thus we come back to the argument for having two-tiered interrupt handling, with a driver having the freedom to choose which of either, or both, to register against. Interrupt sharing is an unfortunate reality, but should we discourage drivers from being fast merely because they can't intelligently choose which way to register? INTR_FAST handling shows a significant win in the case of aac, and makes a compelling argument for other drivers to be made INTR_FAST. It's also been shown time and again that 5-current suffers in all respects from high interrupt latency. So arbitrarily saying that driver X, which generates maybe 100 int/sec at it's peak, is of higher priority in the registration scheme than driver Y which generates 10,000 int/sec, seems rather odd. What I'd really like to see is the following: - non-exclusive fast handlers that allow a driver to quickly ACK the hardware and schedule the appropriate completion mechanism. - taskqueues be deprecated from being a general completion mechanism to being an exception-only or low-priority mechanism. - ithreads be allowed to be scheduled from a fast handler to handle completion processing. Ideally ithreads should be dedicated, but I'm not sure if this is feasable. - if no fast handler is registered, then the registered ithread handler is scheduled to service the interrupt. This allows drivers to transition at their leasure, and keeps support for things like cardbus that likely can never be made INTR_FAST. - callbacks into the driver when a fast handler cannot be granted or needs to be demoted for whatever reason. While the argument can be made to concentrate solely on making ithread scheduling really fast, that strategy means that holding a lock in an ithread will prevent other hardware on the shared interrupt from getting serviced until the lock is released. I'm all for making ithreads be really fast, though, and I think that it would be a good compliment to the two-tier strategy. Scott From owner-freebsd-arch@FreeBSD.ORG Tue Feb 10 05:02:32 2004 Return-Path: Delivered-To: freebsd-arch@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id F0BB916A4CE for ; Tue, 10 Feb 2004 05:02:32 -0800 (PST) Received: from dswu82.btconnect.com (dswu82.btconnect.com [193.113.154.22]) by mx1.FreeBSD.org (Postfix) with SMTP id 78DAA43D1D for ; Tue, 10 Feb 2004 05:02:32 -0800 (PST) (envelope-from BPICKLES@btconnect.com) Received: from sdlbase (actually host 252.91.134.81.in-addr.arpa) by dswu82 with SMTP-CUST (XT-PP) with ESMTP; Tue, 10 Feb 2004 13:02:24 +0000 Message-ID: <007601c3efd7$24db6130$fc5b8651@sdlbase> From: "Bob Pickles" To: Date: Tue, 10 Feb 2004 13:09:39 -0000 MIME-Version: 1.0 X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 6.00.2800.1158 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1165 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable X-Content-Filtered-By: Mailman/MimeDel 2.1.1 Subject: Device Driver Question X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list Reply-To: Bob Pickles List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 10 Feb 2004 13:02:33 -0000 Hi Successfully implemented a driver in 5.1 using a call to 'pci_get_devid' The moved onto 5.2 and can't find it anywhere... come to think of it, I = can't find it anywhere in the 5.1 system either. Very strange stuff, I would = at least=20 expect an object file with the reference. Any ideas. Regards Bob Pickles --- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.574 / Virus Database: 364 - Release Date: 1/29/2004 From owner-freebsd-arch@FreeBSD.ORG Tue Feb 10 22:37:29 2004 Return-Path: Delivered-To: freebsd-arch@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 6545C16A4CE for ; Tue, 10 Feb 2004 22:37:29 -0800 (PST) Received: from harmony.village.org (rover.bsdimp.com [204.144.255.66]) by mx1.FreeBSD.org (Postfix) with ESMTP id F15F843D2F for ; Tue, 10 Feb 2004 22:37:28 -0800 (PST) (envelope-from imp@bsdimp.com) Received: from localhost (warner@rover2.village.org [10.0.0.1]) by harmony.village.org (8.12.10/8.12.9) with ESMTP id i1B6bOnJ017182; Tue, 10 Feb 2004 23:37:25 -0700 (MST) (envelope-from imp@bsdimp.com) Date: Tue, 10 Feb 2004 23:37:15 -0700 (MST) Message-Id: <20040210.233715.75562900.imp@bsdimp.com> To: bpickles@sbs.com, BPICKLES@btconnect.com From: "M. Warner Losh" In-Reply-To: <007601c3efd7$24db6130$fc5b8651@sdlbase> References: <007601c3efd7$24db6130$fc5b8651@sdlbase> X-Mailer: Mew version 3.3 on Emacs 21.3 / Mule 5.0 (SAKAKI) Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit cc: freebsd-arch@freebsd.org Subject: Re: Device Driver Question X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 11 Feb 2004 06:37:29 -0000 In message: <007601c3efd7$24db6130$fc5b8651@sdlbase> "Bob Pickles" writes: : Successfully implemented a driver in 5.1 using a call to 'pci_get_devid' It is an inline. Look in src/sys/dev/pci/pcivar.h: ... #define PCI_ACCESSOR(var, ivar, type) \ __BUS_ACCESSOR(pci, var, PCI, ivar, type) ... PCI_ACCESSOR(devid, DEVID, uint32_t) ... Warner From owner-freebsd-arch@FreeBSD.ORG Wed Feb 11 15:34:54 2004 Return-Path: Delivered-To: freebsd-arch@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 3043716A4CE for ; Wed, 11 Feb 2004 15:34:54 -0800 (PST) Received: from aware.akrobiz.com (unknown [66.218.140.130]) by mx1.FreeBSD.org (Postfix) with SMTP id D609443D1D for ; Wed, 11 Feb 2004 15:34:53 -0800 (PST) (envelope-from james@akrobiz.com) Received: (qmail 6115 invoked from network); 11 Feb 2004 23:41:48 -0000 Received: from unknown (HELO bug) (66.218.129.134) by aware.akrobiz.com with SMTP; 11 Feb 2004 23:41:48 -0000 Message-ID: <000e01c3f0f7$a765c980$0500a8c0@bug> From: "James Lehman" To: Date: Wed, 11 Feb 2004 18:34:55 -0500 MIME-Version: 1.0 X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 6.00.2800.1158 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1165 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable X-Content-Filtered-By: Mailman/MimeDel 2.1.1 Subject: Q: frame buffer video in FreeBSD ??? X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 11 Feb 2004 23:34:54 -0000 Hello everyone. Like many other people new to FreeBSD, I come from many years of experience with Linux. In Linux we can build the kernel to provide a frame buffer device(s) /dev/fb0 fb1, fb2... This is basically a file descriptor that actually refers to the memory on the video card. Using ioctl system calls to this descriptor gets and sets resolution and color depth, etc. I've written a fairly comprehensive API in C called ezfb. http://www.akrobiz.com/ezfb/ Is there anything like this in FreeBSD? Is there any way to port this code to FreeBSD? Thanks! From owner-freebsd-arch@FreeBSD.ORG Wed Feb 11 19:34:52 2004 Return-Path: Delivered-To: freebsd-arch@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 76C5A16A4CE for ; Wed, 11 Feb 2004 19:34:52 -0800 (PST) Received: from rwcrmhc13.comcast.net (rwcrmhc13.comcast.net [204.127.198.39]) by mx1.FreeBSD.org (Postfix) with ESMTP id 6F71743D1D for ; Wed, 11 Feb 2004 19:34:52 -0800 (PST) (envelope-from rodrigc@crodrigues.org) Received: from h00609772adf0.ne.client2.attbi.com ([66.31.45.197]) by comcast.net (rwcrmhc13) with ESMTP id <2004021203345101500c6nhne>; Thu, 12 Feb 2004 03:34:51 +0000 Received: from h00609772adf0.ne.client2.attbi.com (localhost.crodrigues.org [127.0.0.1])i1C3Z1hd061652; Wed, 11 Feb 2004 22:35:01 -0500 (EST) (envelope-from rodrigc@h00609772adf0.ne.client2.attbi.com) Received: (from rodrigc@localhost)i1C3Z1Xu061651; Wed, 11 Feb 2004 22:35:01 -0500 (EST) (envelope-from rodrigc) Date: Wed, 11 Feb 2004 22:35:01 -0500 From: Craig Rodrigues To: James Lehman Message-ID: <20040212033501.GA61512@crodrigues.org> References: <000e01c3f0f7$a765c980$0500a8c0@bug> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <000e01c3f0f7$a765c980$0500a8c0@bug> User-Agent: Mutt/1.4.1i cc: freebsd-arch@freebsd.org Subject: Re: Q: frame buffer video in FreeBSD ??? X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 12 Feb 2004 03:34:52 -0000 On Wed, Feb 11, 2004 at 06:34:55PM -0500, James Lehman wrote: > Hello everyone. > > Like many other people new to FreeBSD, > I come from many years of experience with Linux. > > In Linux we can build the kernel to provide a frame buffer device(s) > /dev/fb0 fb1, fb2... > > Is there anything like this in FreeBSD? You might want to ask Nicholas Souch about the status of KGI4BSD: http://people.freebsd.org/~nsouch/kgi4BSD That's the closest thing I can think of. -- Craig Rodrigues http://crodrigues.org rodrigc@crodrigues.org From owner-freebsd-arch@FreeBSD.ORG Thu Feb 12 22:26:13 2004 Return-Path: Delivered-To: freebsd-arch@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id D161716A4CF for ; Thu, 12 Feb 2004 22:26:13 -0800 (PST) Received: from nagual.pp.ru (pobrecita.freebsd.ru [194.87.13.42]) by mx1.FreeBSD.org (Postfix) with ESMTP id AE46443D3F for ; Thu, 12 Feb 2004 22:26:12 -0800 (PST) (envelope-from ache@pobrecita.freebsd.ru) Received: from pobrecita.freebsd.ru (ache@localhost [127.0.0.1]) by nagual.pp.ru (8.12.10/8.12.10) with ESMTP id i1D6QAMO053708 for ; Fri, 13 Feb 2004 09:26:11 +0300 (MSK) (envelope-from ache@pobrecita.freebsd.ru) Received: (from ache@localhost) by pobrecita.freebsd.ru (8.12.10/8.12.10/Submit) id i1D6QAox053688 for freebsd-arch@freebsd.org; Fri, 13 Feb 2004 09:26:10 +0300 (MSK) (envelope-from ache) Date: Fri, 13 Feb 2004 09:26:10 +0300 From: Andrey Chernov To: freebsd-arch@freebsd.org Message-ID: <20040213062610.GA53679@nagual.pp.ru> Mail-Followup-To: Andrey Chernov , freebsd-arch@freebsd.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.5.5.1i Subject: test, ignore it X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 13 Feb 2004 06:26:14 -0000