Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 23 Feb 2007 08:35:58 -0800
From:      "Kunze, Aaron" <aaron.kunze@intel.com>
To:        "Daniel Eischen" <deischen@freebsd.org>, "Robert Watson" <rwatson@freebsd.org>
Cc:        atmblr@gmail.com, freebsd-smp@freebsd.org
Subject:   RE: Setting CPU affinity to process( Freebsd smp kernel)
Message-ID:  <07DDDFCFB8BE0A43BCA52E743373DBDC03102190@orsmsx416.amr.corp.intel.com>
In-Reply-To: <Pine.GSO.4.64.0702231107580.29991@sea.ntplx.net>
References:  <07DDDFCFB8BE0A43BCA52E743373DBDC030C5D5A@orsmsx416.amr.corp.intel.com> <20070223151158.Q88189@fledge.watson.org> <Pine.GSO.4.64.0702231107580.29991@sea.ntplx.net>

next in thread | previous in thread | raw e-mail | index | archive | help
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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?07DDDFCFB8BE0A43BCA52E743373DBDC03102190>