From owner-freebsd-alpha Tue Mar 27 2: 5:23 2001 Delivered-To: freebsd-alpha@freebsd.org Received: from finch-post-12.mail.demon.net (finch-post-12.mail.demon.net [194.217.242.41]) by hub.freebsd.org (Postfix) with ESMTP id AB79037B718; Tue, 27 Mar 2001 02:05:19 -0800 (PST) (envelope-from dfr@nlsystems.com) Received: from [62.49.251.130] (helo=herring.nlsystems.com) by finch-post-12.mail.demon.net with esmtp (Exim 2.12 #1) id 14hqLi-0001jK-0C; Tue, 27 Mar 2001 10:05:15 +0000 Received: from herring (herring [10.0.0.2]) by herring.nlsystems.com (8.11.2/8.11.2) with ESMTP id f2RA3x433434; Tue, 27 Mar 2001 11:03:59 +0100 (BST) (envelope-from dfr@nlsystems.com) Date: Tue, 27 Mar 2001 11:03:59 +0100 (BST) From: Doug Rabson To: Greg Lehey Cc: Mike Smith , Poul-Henning Kamp , John Baldwin , , Subject: Re: dev_t size mismatch kernel / userland In-Reply-To: <20010327100548.D40349@wantadilla.lemis.com> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-alpha@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org On Tue, 27 Mar 2001, Greg Lehey wrote: > >> The other issue is that exporting expurgated versions of kernel > >> structures is expensive. We've been exporting the unexpurgated > >> versions for years elsewhere, for example--see the proc size mismatch > >> messages from ps(1). That got fixed, not because it was "unclean", > >> but because it was a bloody nuisance. Yes, it's "clean" not to export > >> mutexes and dev_ts and friends, but it requires a fair amount of code > >> to do it, and it requires two structures which need to be kept in > >> sync. Exporting them doesn't do any harm that I can see. I don't > >> think that it's self-evident that you need to go to this much trouble. > > > > You basically shoot your own argument dead here. > > Your unsubstantiated claim. > > > Don't export private data structures to userland. End of story. 8) > > No, categorical statements prove nothing. The point is that this structure is part of the ABI between kernel and user parts of vinum. By exposing implementation details in the ABI, you are inevitable making the ABI more fragile, with potential knock-on problems when kernel and user parts get out of sync. In my opinion, all APIs should be defined as clearly as possible without emdedding any implementation details if at all possible. Structures in APIs should be designed carefully and used sparingly since they are the single largest cause of ABI breakage. Efficiency concerns are only relavent if the API must be particularly fast - I don't think this is the case here. -- Doug Rabson Mail: dfr@nlsystems.com Phone: +44 20 8348 6160 To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-alpha" in the body of the message