Thanks for the info. The Linux equivalent would be sched_setaffinity
which takes a bitmask as input, allowing the user to define which
processors will run a particular thread. Here's a link:
http://ibm5.ma.utexas.edu/cgi-bin/man-cgi?sched_setaffinity+2
> > There's a potential for=20
> > conflict between the kernel's use of pinning and binding for kernel=20
> > synchronization and the user space affinity model, which will be=20
Can you elaborate on this? Some of my colleagues and I are considering
tackling this and would like to avoid such pitfalls, if possible.
Aaron
--------------------------
Aaron Kunze
Advanced Visual Computing
aaron.kunze@intel.com
--PGP Key ID: 0x81124B7C--
--NOT SPEAKING FOR INTEL--
-------GO BOILERS!!-------
=20
> -----Original Message-----
> From: Daniel Eischen [mailto:deischen@freebsd.org]=20
> Sent: Friday, February 23, 2007 8:09 AM
> To: Robert Watson
> Cc: Kunze, Aaron; atmblr@gmail.com; freebsd-smp@freebsd.org
> Subject: Re: Setting CPU affinity to process( Freebsd smp kernel)
>=20
> On Fri, 23 Feb 2007, Robert Watson wrote:
>=20
> > On Wed, 21 Feb 2007, Kunze, Aaron wrote:
> >
> >> Does anyone know if this will change any time soon? For=20
> example, is=20
> >> anyone working on exposing affinity to user-space applications via=20
> >> extensions of the pthreads interface?
> >>=20
> >> Sorry to reply to such an old thread...
> >
> > I know of no work along these lines currently, but it's something a=20
> > lot of people would like to see happen. There's a potential for=20
> > conflict between the kernel's use of pinning and binding for kernel=20
> > synchronization and the user space affinity model, which will be=20
> > entirely avoided if done right. :-) For now, it's quite=20
> easy to add a=20
> > sysctl/syscall that allows user space to send the kernel=20
> scheduler's=20
> > notion of thread binding, but this isn't really the right=20
> approach. =20
> > As I understand it, some systems support setting CPU=20
> affinity for a thread as a set of CPUs it is willing to run on ?
>=20
> I know Solaris has processor_bind(2) and pset_bind(2):
>=20
> http://docs.sun.com/app/docs/doc/816-5167/6mbb2jaeu?a=3Dexpand#P
>=20
> --
> DE
>=20
_______________________________________________
freebsd-smp@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-smp
To unsubscribe, send any mail to "freebsd-smp-unsubscribe@freebsd.org"