From owner-freebsd-hackers@FreeBSD.ORG Mon Jul 3 12:02:33 2006 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 9031916A492; Mon, 3 Jul 2006 12:02:33 +0000 (UTC) (envelope-from CZander@nvidia.com) Received: from HQEMGATE01.nvidia.com (hqemgate01.nvidia.com [216.228.112.170]) by mx1.FreeBSD.org (Postfix) with ESMTP id D6C4143D53; Mon, 3 Jul 2006 12:02:26 +0000 (GMT) (envelope-from CZander@nvidia.com) Received: from hqemfe03.nvidia.com (Not Verified[172.16.227.123]) by HQEMGATE01.nvidia.com id ; Mon, 03 Jul 2006 05:03:43 -0700 Received: from nvidia.com ([172.16.228.84]) by hqemfe03.nvidia.com with Microsoft SMTPSVC(6.0.3790.1830); Mon, 3 Jul 2006 05:02:08 -0700 Date: Mon, 3 Jul 2006 14:02:41 +0200 From: Christian Zander To: Robert Watson Message-ID: <20060703120241.GT692@wolf.nvidia.com> References: <20060629111231.GA692@wolf.nvidia.com> <44A3FD87.8000006@pbxpress.com> <20060702.214302.-1622603270.imp@bsdimp.com> <20060703103108.D26325@fledge.watson.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20060703103108.D26325@fledge.watson.org> User-Agent: Mutt/1.4.2.1i X-NVConfidentiality: public X-OriginalArrivalTime: 03 Jul 2006 12:02:08.0631 (UTC) FILETIME=[8261E870:01C69E98] Cc: freebsd-hackers@freebsd.org, kmacy@fsmware.com Subject: Re: NVIDIA FreeBSD kernel feature requests X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Christian Zander List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 03 Jul 2006 12:02:33 -0000 On Mon, Jul 03, 2006 at 10:33:29AM +0100, Robert Watson wrote: > > On Sun, 2 Jul 2006, M. Warner Losh wrote: > > >In message: > > "Kip Macy" writes: > >: IIRC lack of per instance cdevs also limits Freebsd to one vmware > >instance. > > > >Can you describe the proper semantics here? A cdev is a cdev, and when we > >do things like dup we just copy the reference to that cdev. This has also > >traditionally been resisted on layering violations grounds (since the data > >we have doesn't map easily back to the fd at the time we call the cdev > >methods). > > In the past, I've done some experimental implementation allowing devfs > providers to provide session cookies for the file descriptor. This is > fairly contrary to our VFS design, and our notions of "open" are a bit hazy > -- for example, there are a number of situations in which I/O occurs on > vnodes without the vnode being open. The devfs cloning model does offer > significant simplications in many cases, and certainly fits our VFS model a > bit more happily. It also exists today. It may be that our VMware kernel > module doesn't know about it yet, however. > I've made a first pass at implementing support for the device cloning mechanism in the NVIDIA FreeBSD graphics driver and it seems to work well with the driver's notification mechanism on FreeBSD 5.3. I'll need to do more testing and check what implications the mechanism has (locking, etc.), but it looks like it's a good match. Thanks, > Robert N M Watson > Computer Laboratory > University of Cambridge > > > > >Warner > > > >: On 6/29/06, Oleksandr Tymoshenko wrote: > >: > Christian Zander wrote: > >: > > Hi all, > >: > > # Task: implement mechanism to allow character drivers to > >: > > maintain per-open instance data (e.g. like the Linux > >: > > kernel's 'struct file *'). > >: > > Motivation: allows per thread NVIDIA notification delivery; also > >: > > reduces CPU overhead for notification delivery > >: > > from the NVIDIA kernel module to the X driver and to > >: > > OpenGL. > >: > > Priority: should translate to improved X/OpenGL performance. > >: > > Status: has not been started. > >: > I've stumbled across this issue a while ago. Actually it can > >: > be partially solved using EVENTHANDLER_REGISTER of dev_clone event with > >: > keeping state structure in si_drv1 or si_drv2 fields. I'm not sure it's > >: > the best solution but it works for me though it smells like hack, and > >: > looks like hack :) Anyway, having legitimate per-open instance data > >: > structures of cdevs is a great assistance in porting linux drivers to > >: > FreeBSD. Just my $0.02. > >: > > >: > -- > >: > Sincerely, > >: > > >: > Oleksandr Tymoshenko > >: > PBXpress Communications, Inc. > >: > http://www.pbxpress.com > >: > Tel./Fax.: +1 866 SIP PBX1 Ext. 656 > >: > _______________________________________________ > >: > freebsd-hackers@freebsd.org mailing list > >: > http://lists.freebsd.org/mailman/listinfo/freebsd-hackers > >: > To unsubscribe, send any mail to > >"freebsd-hackers-unsubscribe@freebsd.org" > >: > > >: _______________________________________________ > >: freebsd-hackers@freebsd.org mailing list > >: http://lists.freebsd.org/mailman/listinfo/freebsd-hackers > >: To unsubscribe, send any mail to > >"freebsd-hackers-unsubscribe@freebsd.org" > >: > >_______________________________________________ > >freebsd-hackers@freebsd.org mailing list > >http://lists.freebsd.org/mailman/listinfo/freebsd-hackers > >To unsubscribe, send any mail to "freebsd-hackers-unsubscribe@freebsd.org" > > > _______________________________________________ > freebsd-hackers@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-hackers > To unsubscribe, send any mail to "freebsd-hackers-unsubscribe@freebsd.org" -- christian zander ch?zander@nvidia.com