From owner-freebsd-hackers@FreeBSD.ORG Thu Jun 29 16:49:12 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 8D5C616A416 for ; Thu, 29 Jun 2006 16:49:12 +0000 (UTC) (envelope-from kan@kan.dnsalias.net) Received: from kan.dnsalias.net (c-24-63-93-195.hsd1.ma.comcast.net [24.63.93.195]) by mx1.FreeBSD.org (Postfix) with ESMTP id EC4AB43D5A for ; Thu, 29 Jun 2006 16:49:11 +0000 (GMT) (envelope-from kan@kan.dnsalias.net) Received: from kan.dnsalias.net (TheGuy@localhost [127.0.0.1]) by kan.dnsalias.net (8.13.7/8.13.7) with ESMTP id k5TGnB9K004279; Thu, 29 Jun 2006 12:49:11 -0400 (EDT) (envelope-from kan@kan.dnsalias.net) Received: (from kan@localhost) by kan.dnsalias.net (8.13.7/8.13.7/Submit) id k5TGnAGx004278; Thu, 29 Jun 2006 12:49:10 -0400 (EDT) (envelope-from kan) Date: Thu, 29 Jun 2006 12:49:10 -0400 From: Alexander Kabaev To: Oleksandr Tymoshenko Message-ID: <20060629164910.GA4242@kan.dnsalias.net> References: <20060629111231.GA692@wolf.nvidia.com> <44A3FD87.8000006@pbxpress.com> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="BXVAT5kNtrzKuDFl" Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.11 X-Mailman-Approved-At: Thu, 29 Jun 2006 17:30:13 +0000 Cc: freebsd-hackers@freebsd.org, Christian Zander Subject: Re: NVIDIA FreeBSD kernel feature requests X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 29 Jun 2006 16:49:12 -0000 --BXVAT5kNtrzKuDFl Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Thu, Jun 29, 2006 at 09:32:42AM -0700, Kip Macy wrote: > IIRC lack of per instance cdevs also limits Freebsd to one vmware instanc= e. >=20 > -Kip >=20 > 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. > > WHY it smells like a hack? It was designed precisely to do that. I am using cloned devices in our product with great success. Every client opening 'magic' device gets its own exclusive cloned device instance and everything works like a charm. I am yet to hear any single coherent description of what Linux's approach has over device cloning in FreeBSD. I wouldn't mind being educated on this. --=20 Alexander Kabaev --BXVAT5kNtrzKuDFl Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.3 (FreeBSD) iD8DBQFEpASGQ6z1jMm+XZYRAroVAJ0R6u7D90l6UcrZHWk5bztNimaGkgCaAl6V 4b+ONyfJQAez/yhMawR6yQ0= =cX3T -----END PGP SIGNATURE----- --BXVAT5kNtrzKuDFl--