From owner-cvs-src@FreeBSD.ORG Fri Aug 8 19:17:44 2008 Return-Path: Delivered-To: cvs-src@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C26AA106567B; Fri, 8 Aug 2008 19:17:44 +0000 (UTC) (envelope-from stas@ht-systems.ru) Received: from smtp.ht-systems.ru (mr0.ht-systems.ru [78.110.50.55]) by mx1.freebsd.org (Postfix) with ESMTP id 34D4A8FC15; Fri, 8 Aug 2008 19:17:43 +0000 (UTC) (envelope-from stas@ht-systems.ru) Received: from [195.161.9.2] (helo=sputnik.SpringDaemons.com) by smtp.ht-systems.ru with esmtpa (Exim 4.62) (envelope-from ) id 1KRXT2-0003j2-Vu; Fri, 08 Aug 2008 23:17:41 +0400 Received: by sputnik.SpringDaemons.com (Postfix, from userid 1024) id B2082941D1B; Fri, 8 Aug 2008 23:21:18 +0400 (MSD) Date: Fri, 8 Aug 2008 23:21:07 +0400 From: Stanislav Sedov To: Kostik Belousov Message-Id: <20080808232107.8889c5b2.stas@FreeBSD.org> In-Reply-To: <20080808185133.GG97161@deviant.kiev.zoral.com.ua> References: <200808081631.m78GVG9i088754@repoman.freebsd.org> <200808081251.17686.jhb@freebsd.org> <20080808181052.GF97161@deviant.kiev.zoral.com.ua> <200808081427.42536.jhb@freebsd.org> <20080808185133.GG97161@deviant.kiev.zoral.com.ua> Organization: The FreeBSD Project X-XMPP: ssedov@jabber.ru X-Voice: +7 916 849 20 23 X-PGP-Fingerprin: F21E D6CC 5626 9609 6CE2 A385 2BF5 5993 EB26 9581 X-Mailer: carrier-pigeon Mime-Version: 1.0 Content-Type: multipart/signed; protocol="application/pgp-signature"; micalg="PGP-SHA1"; boundary="Signature=_Fri__8_Aug_2008_23_21_07_+0400__tX92_X8DDIvYAe2" Cc: Stanislav Sedov , cvs-src@freebsd.org, src-committers@freebsd.org, cvs-all@freebsd.org, John Baldwin Subject: Re: cvs commit: src/share/man/man4 Makefile cpuctl.4 src/sys/amd64/amd64 support.S src/sys/amd64/conf NOTES src/sys/amd64/include cpufunc.h specialreg.h src/sys/conf files.amd64 files.i386 src/sys/dev/cpuctl cpuctl.c ... X-BeenThere: cvs-src@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: CVS commit messages for the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 08 Aug 2008 19:17:44 -0000 --Signature=_Fri__8_Aug_2008_23_21_07_+0400__tX92_X8DDIvYAe2 Content-Type: text/plain; charset=US-ASCII Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Fri, 8 Aug 2008 21:51:33 +0300 Kostik Belousov mentioned: > >=20 > > You can achieve that now with cpuset. :) (See my ping-pong test progra= m=20 > > recently which used cpuid to fetch the APIC ID to test for ping-ponging= in=20 > > the scheduler.) >=20 > If this is a backout request (for cpuid functionality) then we will do it. >=20 > But I considered it much easier and cleaner to do > fd =3D open("/dev/cpuctlN", O_RDWR); > ioctl(fd, CPUCTL_CPUID, &x); > if (x.y) > ioctl(fd, CPUCTL_WRMSR, ...); > close(fd); > then > fd =3D open("/dev/cpuctlN", O_RDWR); > cpuset(...); /* bind to cpu */ > __asm__("cpuid" : =3D0 (x)); > if (x.y) > ioctl(fd, CPUCTL_WRMSR, ...); > cpuset(...); /* restore prev mask */ > close(fd); >=20 One of the reasons to leave the cpuid functionality, present in sysutils/devcpu, in cpuctl(4) was the fact, the software that is supposed to use wrmsr/rdmsr calls, also usually perform cpuid checks as well, and it will be clean to provide access to all of this via a single interface. --=20 Stanislav Sedov ST4096-RIPE --Signature=_Fri__8_Aug_2008_23_21_07_+0400__tX92_X8DDIvYAe2 Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.9 (FreeBSD) iEYEARECAAYFAkicnK4ACgkQK/VZk+smlYHYhwCfahQiwNyKyDAXQe76sT15luwT rWwAn0tY/oQ6KCOIq4/8g/Ke4hmajAkI =jTxn -----END PGP SIGNATURE----- --Signature=_Fri__8_Aug_2008_23_21_07_+0400__tX92_X8DDIvYAe2--