Date: Sat, 7 Oct 2006 10:26:09 +0400 From: Stanislav Sedov <stas@FreeBSD.org> To: David Xu <davidxu@freebsd.org> Cc: Stanislav Sedov <stas@freebsd.org>, freebsd-hackers@freebsd.org, Jonathan Chen <jon@freebsd.org> Subject: Re: running code on all CPUs Message-ID: <20061007102609.c0c768a4.stas@FreeBSD.org> In-Reply-To: <200610070738.12529.davidxu@freebsd.org> References: <20061004214040.GA6878@porthos.spock.org> <200610050829.36266.davidxu@freebsd.org> <20061006174504.c4af61ba.stas@FreeBSD.org> <200610070738.12529.davidxu@freebsd.org>
next in thread | previous in thread | raw e-mail | index | archive | help
--Signature=_Sat__7_Oct_2006_10_26_09_+0400__l/DQ+Q6pE05Z876 Content-Type: text/plain; charset=KOI8-R Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Sat, 7 Oct 2006 07:38:12 +0800 David Xu <davidxu@freebsd.org> mentioned: > On Friday 06 October 2006 21:45, Stanislav Sedov wrote: > > > AFAIK, you can use scheduler API, the sched_bind() moves current th= read > > > to a specific CPU, hope this helps. > > > > You can find examples e.g. in hwpmc driver. Just grep by sched_bin. > > > > -- > > Stanislav Sedov <stas@FreeBSD.org> [[=F2=CF=D3=D3=C9=D1= , =ED=CF=D3=CB=D7=C1]] > > PGP id: 0xEB269581 http://people.freebsd.org/~stas/stas.key.asc > > sched_pin is different than sched_bind, sched_pin only pins current thr= ead on > current cpu, but sched_bind allows a thread to migrate to another CPU, = after > the sched_bind returns, the thread should already be running on the spe= cified > CPU, it makes it possible that a thread can iterate through all availa= ble > CPUs. > Yeah;-) I mean sched_bind, just typo. -- Stanislav Sedov <stas@FreeBSD.org> [[=F2=CF=D3=D3=C9=D1, = =ED=CF=D3=CB=D7=C1]] PGP id: 0xEB269581 http://people.freebsd.org/~stas/stas.key.asc --Signature=_Sat__7_Oct_2006_10_26_09_+0400__l/DQ+Q6pE05Z876 Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.5 (FreeBSD) iD8DBQFFJ0iFK/VZk+smlYERAg8eAJ48S5O8iUgs9jvgs9hSKSiZsdONQgCffAJ2 CeQrC4rk6IgqPGAj3BGMQKs= =KOcR -----END PGP SIGNATURE----- --Signature=_Sat__7_Oct_2006_10_26_09_+0400__l/DQ+Q6pE05Z876--
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20061007102609.c0c768a4.stas>