running code on all CPUs
Stanislav Sedov
stas at FreeBSD.org
Fri Oct 6 23:26:33 PDT 2006
On Sat, 7 Oct 2006 07:38:12 +0800
David Xu <davidxu at 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 at 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 at FreeBSD.org> [[Россия, Москва]]
PGP id: 0xEB269581 http://people.freebsd.org/~stas/stas.key.asc
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 187 bytes
Desc: not available
Url : http://lists.freebsd.org/pipermail/freebsd-hackers/attachments/20061007/fb8eb535/attachment.pgp
More information about the freebsd-hackers
mailing list