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>
index | next in thread | previous in thread | raw e-mail
[-- Attachment #1 --] 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 thread > > > 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> [[Россия, Москва]] > > PGP id: 0xEB269581 http://people.freebsd.org/~stas/stas.key.asc > > sched_pin is different than sched_bind, sched_pin only pins current thread 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 specified > CPU, it makes it possible that a thread can iterate through all available > CPUs. > Yeah;-) I mean sched_bind, just typo. -- Stanislav Sedov <stas@FreeBSD.org> [[Россия, Москва]] PGP id: 0xEB269581 http://people.freebsd.org/~stas/stas.key.asc [-- Attachment #2 --] -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.5 (FreeBSD) iD8DBQFFJ0iFK/VZk+smlYERAg8eAJ48S5O8iUgs9jvgs9hSKSiZsdONQgCffAJ2 CeQrC4rk6IgqPGAj3BGMQKs= =KOcR -----END PGP SIGNATURE-----help
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20061007102609.c0c768a4.stas>
