From owner-freebsd-hackers Sat Dec 8 12:40:48 2001 Delivered-To: freebsd-hackers@freebsd.org Received: from mass.dis.org (mass.dis.org [216.240.45.41]) by hub.freebsd.org (Postfix) with ESMTP id A798D37B41E for ; Sat, 8 Dec 2001 12:40:20 -0800 (PST) Received: from mass.dis.org (localhost [127.0.0.1]) by mass.dis.org (8.11.6/8.11.3) with ESMTP id fB8KjOT01294; Sat, 8 Dec 2001 12:45:24 -0800 (PST) (envelope-from msmith@mass.dis.org) Message-Id: <200112082045.fB8KjOT01294@mass.dis.org> X-Mailer: exmh version 2.1.1 10/15/1999 To: Poul-Henning Kamp Cc: Terry Lambert , Dave Rufino , Alfred Perlstein , freebsd-hackers@FreeBSD.ORG Subject: Re: statefulness in character device drivers In-reply-to: Your message of "Sat, 08 Dec 2001 11:51:32 +0100." <47779.1007808692@critter.freebsd.dk> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Date: Sat, 08 Dec 2001 12:45:24 -0800 From: Mike Smith Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG > >> >Sorry, unbelievably bad at explaining myself. Per-open data is what i > >> >meant. The reason I'm interested is it would make a full nvidia driver > >> >port quite a bit easier. > >> > >> Sorry, I know of no current plans which adress this. > >> > >> The issue is non-trivial to fix because we currently don't pass > >> dup(2) events through the vnode layer. > > > >Are you sure this is even necessary? > > > >They are talking about "per-open", not "per-fd-instance" data, > >which could easily exclude dup, dup2, and fcntl(f_DUPFD). > > If you don't include dup/dup2/fnctl in your accounting, you > can only reliably tell "first open", "another open", "some close" > and "final close". You an modulate this with the pid, but you > still have no idea what is going on in any amount of detail. For this class of problems, you don't care. Inheritance is fine; what you're almost doing is cloning within the driver; on each open you cons a new sub-softc and attach it to the open instance. I think this is quite desirable. -- ... every activity meets with opposition, everyone who acts has his rivals and unfortunately opponents also. But not because people want to be opponents, rather because the tasks and relationships force people to take different points of view. [Dr. Fritz Todt] V I C T O R Y N O T V E N G E A N C E To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message