From owner-freebsd-current@FreeBSD.ORG Mon Jan 14 02:37:17 2008 Return-Path: Delivered-To: current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 1B6AA16A417; Mon, 14 Jan 2008 02:37:17 +0000 (UTC) (envelope-from doconnor@gsoft.com.au) Received: from cain.gsoft.com.au (cain.gsoft.com.au [203.31.81.10]) by mx1.freebsd.org (Postfix) with ESMTP id ED46B13C43E; Mon, 14 Jan 2008 02:37:15 +0000 (UTC) (envelope-from doconnor@gsoft.com.au) Received: from inchoate.gsoft.com.au (inchoate.gsoft.com.au [203.31.81.30]) (authenticated bits=0) by cain.gsoft.com.au (8.13.8/8.13.8) with ESMTP id m0E2OR4n086274 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Mon, 14 Jan 2008 12:54:28 +1030 (CST) (envelope-from doconnor@gsoft.com.au) From: "Daniel O'Connor" To: freebsd-current@freebsd.org Date: Mon, 14 Jan 2008 12:54:18 +1030 User-Agent: KMail/1.9.7 References: <1200197787.67286.13.camel@shumai.marcuscom.com> <20080113182457.GN929@server.vk2pj.dyndns.org> In-Reply-To: MIME-Version: 1.0 Content-Type: multipart/signed; boundary="nextPart2523360.UKpdXc1Aq2"; protocol="application/pgp-signature"; micalg=pgp-sha1 Content-Transfer-Encoding: 7bit Message-Id: <200801141254.20400.doconnor@gsoft.com.au> X-Spam-Score: -3.384 () ALL_TRUSTED,AWL,BAYES_00 X-Scanned-By: MIMEDefang 2.63 on 203.31.81.10 Cc: Kostik Belousov , Peter Jeremy , Joe Marcus Clarke , current , Igor Mozolevsky Subject: Re: RFC: Adding a hw.features[2] sysctl X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 14 Jan 2008 02:37:17 -0000 --nextPart2523360.UKpdXc1Aq2 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Content-Disposition: inline On Mon, 14 Jan 2008, Igor Mozolevsky wrote: > On 13/01/2008, Peter Jeremy wrote: > > IMHO, no. Virtually all similar FreeBSD information is exported > > via sysctl and this sort of information fits neatly into the > > existing MIB tree as either dev.cpu.N.features or hw.cpu.features > > /dev/sndstat? A single handy counter example to the many many that are sysctls :) > If it's in /dev you can do neat tricks like ioctl-ing queries (like > ioctl(/dev/cpuinfo, CINFOCTL_HAS_FEATURES, CINFO_SSE3|CINFO_SSSE3)) > instead of having *every* app parse the result of a sysctl; most of > the time you'd only want to check for specific feature , it's much > easier to do an ioctl that returns a boolean. Except you can't do that from a shell script. (eg wrapper script to run optimised binaries) sysctl is easy and sysctl is common, just use it.. =2D-=20 Daniel O'Connor software and network engineer for Genesis Software - http://www.gsoft.com.au "The nice thing about standards is that there are so many of them to choose from." -- Andrew Tanenbaum GPG Fingerprint - 5596 B766 97C0 0E94 4347 295E E593 DC20 7B3F CE8C --nextPart2523360.UKpdXc1Aq2 Content-Type: application/pgp-signature; name=signature.asc Content-Description: This is a digitally signed message part. -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.4 (FreeBSD) iD8DBQBHisfU5ZPcIHs/zowRApsMAJoDrR/hkorcS/j9PpJcgnSVejYoAQCffK2c Y6MDu+i3WbSrShnxInuFaOU= =QwOy -----END PGP SIGNATURE----- --nextPart2523360.UKpdXc1Aq2--