From owner-freebsd-arch@FreeBSD.ORG Sat Feb 28 03:10:37 2004 Return-Path: Delivered-To: freebsd-arch@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 5C17016A4F6 for ; Sat, 28 Feb 2004 03:10:17 -0800 (PST) Received: from mailout2.pacific.net.au (mailout2.pacific.net.au [61.8.0.85]) by mx1.FreeBSD.org (Postfix) with ESMTP id 2DF0A43D1F for ; Sat, 28 Feb 2004 03:10:17 -0800 (PST) (envelope-from bde@zeta.org.au) Received: from mailproxy1.pacific.net.au (mailproxy1.pacific.net.au [61.8.0.86])i1SBA15O005508; Sat, 28 Feb 2004 22:10:01 +1100 Received: from gamplex.bde.org (katana.zip.com.au [61.8.7.246]) i1SB9x0I012550; Sat, 28 Feb 2004 22:10:00 +1100 Date: Sat, 28 Feb 2004 22:09:58 +1100 (EST) From: Bruce Evans X-X-Sender: bde@gamplex.bde.org To: John Baldwin In-Reply-To: <200402271007.43299.john@baldwin.cx> Message-ID: <20040228220602.K6048@gamplex.bde.org> References: <20040227230124.D2469@gamplex.bde.org> <200402271007.43299.john@baldwin.cx> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=X-UNKNOWN Content-Transfer-Encoding: QUOTED-PRINTABLE cc: arch@FreeBSD.org cc: Dag-Erling =?iso-8859-1?q?Sm=F8rgrav?= Subject: Re: per-device sysctls X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 28 Feb 2004 11:10:37 -0000 On Fri, 27 Feb 2004, John Baldwin wrote: > On Friday 27 February 2004 07:16 am, Bruce Evans wrote: > > On Thu, 26 Feb 2004, Dag-Erling [iso-8859-1] Sm=F8rgrav wrote: > > > "M. Warner Losh" writes: > > > > How is this different than the sysctl stuff that already exsists fo= r > > > > this and is accessed by devinfo? > > > > > > 1) it is immensely easier to access > > > > > > 2) it gives drivers a well-defined place to put their per-device > > > sysctl variables - devinfo doesn't address that issue at all > > > > Only broken drivers use sysctl variables. ioctl(3) is a much better > > interface that sysctl(3) for accessing per-device info. sysctl(8) is > > a better interface than ioctl(8) for handling the few device control > > things that can be done in a generic way, but this is only because > > there are so few such things that ioctl(8) doesn't exist. > > Note that ioctl's act on dev_t devices, not on device_t devices. We have= two > distinct notions of a device right now: physical hardware devices (new-bu= s) > and UNIX file devices (entries in /dev). You can ioctl the latter, but n= ot > necessarily the former. I think (2) means dev_t devices. I agree that a separate mechanism (but no= t 2) is needed for device_t devices. Bruce