From owner-freebsd-hackers@FreeBSD.ORG Thu Jun 29 20:31:36 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 7D96A16A492 for ; Thu, 29 Jun 2006 20:31:36 +0000 (UTC) (envelope-from sam@errno.com) Received: from ebb.errno.com (ebb.errno.com [69.12.149.25]) by mx1.FreeBSD.org (Postfix) with ESMTP id 05E2444D38 for ; Thu, 29 Jun 2006 20:31:35 +0000 (GMT) (envelope-from sam@errno.com) Received: from [10.0.0.248] (trouble.errno.com [10.0.0.248]) (authenticated bits=0) by ebb.errno.com (8.13.6/8.12.6) with ESMTP id k5TKVYVL020272 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Thu, 29 Jun 2006 13:31:35 -0700 (PDT) (envelope-from sam@errno.com) Message-ID: <44A438A6.40707@errno.com> Date: Thu, 29 Jun 2006 13:31:34 -0700 From: Sam Leffler User-Agent: Thunderbird 1.5.0.2 (X11/20060508) MIME-Version: 1.0 To: Christian Zander References: <20060629111231.GA692@wolf.nvidia.com> <44A3FD87.8000006@pbxpress.com> <20060629164910.GA4242@kan.dnsalias.net> <20060629174100.GW692@wolf.nvidia.com> In-Reply-To: <20060629174100.GW692@wolf.nvidia.com> X-Enigmail-Version: 0.94.0.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Cc: freebsd-hackers@freebsd.org, Alexander Kabaev , Oleksandr Tymoshenko 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 20:31:36 -0000 Christian Zander wrote: > On Thu, Jun 29, 2006 at 12:49:10PM -0400, Alexander Kabaev wrote: >> 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 instance. >>> >>> -Kip >>> >>> 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. >> > > Thanks for your feedback, I hadn't been aware of this interface, but > it sounds promising. When was it first introduced? Are there any > known problems with it and certain FreeBSD releases, or is it expected > to work fine in FreeBSD >= 5.3? It came in with devfs so it should be in all 5.x systems. Sam