Date: Mon, 14 Jan 2008 12:54:18 +1030 From: "Daniel O'Connor" <doconnor@gsoft.com.au> To: freebsd-current@freebsd.org Cc: Kostik Belousov <kostikbel@gmail.com>, Peter Jeremy <peterjeremy@optushome.com.au>, Joe Marcus Clarke <marcus@freebsd.org>, current <current@freebsd.org>, Igor Mozolevsky <igor@hybrid-lab.co.uk> Subject: Re: RFC: Adding a hw.features[2] sysctl Message-ID: <200801141254.20400.doconnor@gsoft.com.au> In-Reply-To: <a2b6592c0801131721w25afae5bg3dcf6a90c1a3d2b7@mail.gmail.com> References: <1200197787.67286.13.camel@shumai.marcuscom.com> <20080113182457.GN929@server.vk2pj.dyndns.org> <a2b6592c0801131721w25afae5bg3dcf6a90c1a3d2b7@mail.gmail.com>
next in thread | previous in thread | raw e-mail | index | archive | help
--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 <peterjeremy@optushome.com.au> 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--
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200801141254.20400.doconnor>