Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 20 Feb 2008 21:59:58 +1100
From:      Peter Jeremy <peterjeremy@optushome.com.au>
To:        Jeff Roberson <jroberson@chesapeake.net>
Cc:        arch@freebsd.org
Subject:   Re: Linux compatible setaffinity.
Message-ID:  <20080220105958.GO51095@server.vk2pj.dyndns.org>
In-Reply-To: <20080219234101.D920@desktop>
References:  <20071219211025.T899@desktop> <18311.49715.457070.397815@grasshopper.cs.duke.edu> <20080112182948.F36731@fledge.watson.org> <20080112170831.A957@desktop> <Pine.GSO.4.64.0801122240510.15683@sea.ntplx.net> <20080112194521.I957@desktop> <20080219234101.D920@desktop>

next in thread | previous in thread | raw e-mail | index | archive | help

--yEPQxsgoJgBvi8ip
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

On Tue, Feb 19, 2008 at 11:55:22PM -1000, Jeff Roberson wrote:
>So what does everyone think of something like this:
>
>int cpuaffinity(int cmd, long which, int masksize, unsigned *mask);
>
>#define AFFINITY_GET	0x1
>#define	AFFINITY_SET	0x2
>#define	AFFINITY_PID	0x4
>#define	AFFINITY_TID	0x8
>
>I'm not married to any of these names.  If you know of something that woul=
d=20
>be more regular please comment.

It's probably not immediately relevant (because I don't have suitable
code and doubt you do either) but how would this extend to:
- a process wanting to set thread affinity to the h/w theads associated
  with a single core (which includes the issue of identifying which
  logical CPUs are linked with which physical cores)
- a process wanting to take advantage of a system's NUMA topology to
  optimise thread affinities.
- creating sets of logical CPUs and assigning sets of processes/threads
  to them.

--=20
Peter Jeremy
Please excuse any delays as the result of my ISP's inability to implement
an MTA that is either RFC2821-compliant or matches their claimed behaviour.

--yEPQxsgoJgBvi8ip
Content-Type: application/pgp-signature
Content-Disposition: inline

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.4 (FreeBSD)

iD8DBQFHvAgu/opHv/APuIcRAm+fAJ4iTJR8HEKsroSBiyo+4hi1dVU6hACcDZWS
l1+Pyc2BmKaa/znC/Bs//Zg=
=coKN
-----END PGP SIGNATURE-----

--yEPQxsgoJgBvi8ip--



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