Date: Fri, 8 Aug 2008 23:21:07 +0400 From: Stanislav Sedov <stas@FreeBSD.org> To: Kostik Belousov <kostikbel@gmail.com> Cc: Stanislav Sedov <stas@freebsd.org>, cvs-src@freebsd.org, src-committers@freebsd.org, cvs-all@freebsd.org, John Baldwin <jhb@freebsd.org> 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 ... 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>
next in thread | previous in thread | raw e-mail | index | archive | help
--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 <kostikbel@gmail.com> 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--
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20080808232107.8889c5b2.stas>