From owner-freebsd-hackers Mon Oct 16 21:28:53 2000 Delivered-To: freebsd-hackers@freebsd.org Received: from smtp05.primenet.com (smtp05.primenet.com [206.165.6.135]) by hub.freebsd.org (Postfix) with ESMTP id 7B2A537B4D7; Mon, 16 Oct 2000 21:28:48 -0700 (PDT) Received: (from daemon@localhost) by smtp05.primenet.com (8.9.3/8.9.3) id VAA19886; Mon, 16 Oct 2000 21:29:10 -0700 (MST) Received: from usr01.primenet.com(206.165.6.201) via SMTP by smtp05.primenet.com, id smtpdAAA1KaWYM; Mon Oct 16 21:29:07 2000 Received: (from tlambert@localhost) by usr01.primenet.com (8.8.5/8.8.5) id VAA06237; Mon, 16 Oct 2000 21:28:41 -0700 (MST) From: Terry Lambert Message-Id: <200010170428.VAA06237@usr01.primenet.com> Subject: Re: Module parameters? (WildWire DSL card driver) To: bright@wintelcom.net (Alfred Perlstein) Date: Tue, 17 Oct 2000 04:28:41 +0000 (GMT) Cc: tlambert@primenet.com (Terry Lambert), gcorcoran@lucent.com (Gary T. Corcoran), freebsd-hackers@FreeBSD.ORG, freebsd-net@FreeBSD.ORG In-Reply-To: <20001016194147.I272@fw.wintelcom.net> from "Alfred Perlstein" at Oct 16, 2000 07:41:48 PM X-Mailer: ELM [version 2.5 PL2] MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG > > > > > #define D_TRACKCLOSE 0x80000 /* track all closes */ > > > > Under what circumstances is it permissable to _not_ set this bit? > > > When you want the old behavior. > > Under what circumstances is it permissable to want the old behaviour? > > Jeez Terry, I don't know, it's how it used to be so I assume it's for > compatibility or for drivers that simply don't care. Am I missing > something here? I guess I'm asking "What moron would want to intentionally disable system resource tracking?". It's OK for the driver to not care, I guess, if it doesn't want to allow you to unload it, and other evil things. I can maybe buy the legacy argument, but, frankly, and I said this when Poul and David first asked that the capability to track closes first went in, unless everyone plays by the same rules, no one benefits. I guess it'd be nice if it weren't possible to have new drivers not support device close tracking, even if they did nothing about it, other than disallowing unloads when the open count was positive. In the specific context of this thread, if there was a control daemon, then the first open could always be the control daemon, and "attach" parameters could be passed by doing an open, noting it was the first open, and delaying the attach until the open count went from 1->2. For symmetry, this means that if I want to change the parameters after a reconfiguration, I need to know when the open count has gone from 2->1 (leaving only the control daemon). In order to differentiate the control daemon failing, from a normal non-control close, I would need to track and maintain a list of who the opener is, and remove from that list on close. As a general approach, this removes the need for a seperate control and usage device distinction, for those devices which have it now. It also means that I can distinguish a control open from another open, and that I can wedge an open in through an ioctl() to let me do things like have opens onto the ISO9660 and DVDROM views onto a DVD, without having to have seperate character and block devices, so tat, given a legal codec, I can play DVDs on FreeBSD, just like you can on MacOS X (which uses the caharcter device for one type of access, and the block device for the other: efectively another control device hack). Terry Lambert terry@lambert.org --- Any opinions in this posting are my own and not those of my present or previous employers. To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message