From owner-freebsd-current@FreeBSD.ORG Mon Jan 14 01:21: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 1C62516A418 for ; Mon, 14 Jan 2008 01:21:17 +0000 (UTC) (envelope-from mozolevsky@gmail.com) Received: from ug-out-1314.google.com (ug-out-1314.google.com [66.249.92.172]) by mx1.freebsd.org (Postfix) with ESMTP id A013213C442 for ; Mon, 14 Jan 2008 01:21:16 +0000 (UTC) (envelope-from mozolevsky@gmail.com) Received: by ug-out-1314.google.com with SMTP id y2so1159568uge.37 for ; Sun, 13 Jan 2008 17:21:15 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:sender:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references:x-google-sender-auth; bh=fY/SxsRhMY2ZnMKGxCd0FUT5XAxtZIB7lIpo2c9vGW0=; b=lXcGd+CVts1vJetcQEb9Kg8+XRiNMCzIuEiVlhJbxE27j8J5HecpR3qIGbtBkY/2dkc7NqlOJ+yZ+lIUM0rjC+bIjIl8uQmx7g7Q0BFJh8i44xSn2OZM1AamyU6gwrrg42a53ziBzpXweDMhep+tWdQGbxpYFo4Qmfsvob0igjw= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:sender:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references:x-google-sender-auth; b=KcpmAd0sgO6GVYBG0nn0ErEHdXMcATq7l0ODZs0D1RHeJXSluyS4ZnTr8n0C07P1xylLnF00/Yt85DgysxGOtWfbUwor+o9vghuTSnmrH/yJy6bp9cTxSA/jtt2ujaq8YnqHaV2Rug/7dv5+OSyQ4sEJiPvFt/ex91nkIc5LhvI= Received: by 10.67.116.18 with SMTP id t18mr3003809ugm.85.1200273675173; Sun, 13 Jan 2008 17:21:15 -0800 (PST) Received: by 10.66.248.11 with HTTP; Sun, 13 Jan 2008 17:21:15 -0800 (PST) Message-ID: Date: Mon, 14 Jan 2008 01:21:15 +0000 From: "Igor Mozolevsky" Sender: mozolevsky@gmail.com To: "Peter Jeremy" In-Reply-To: <20080113182457.GN929@server.vk2pj.dyndns.org> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <1200197787.67286.13.camel@shumai.marcuscom.com> <20080113064450.GW57756@deviant.kiev.zoral.com.ua> <20080113182457.GN929@server.vk2pj.dyndns.org> X-Google-Sender-Auth: ae113a085b5ada77 Cc: Kostik Belousov , Joe Marcus Clarke , current 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 01:21:17 -0000 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? 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. Igor