From owner-freebsd-arch@FreeBSD.ORG Wed Feb 20 13:58:19 2008 Return-Path: Delivered-To: arch@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C82B716A405 for ; Wed, 20 Feb 2008 13:58:19 +0000 (UTC) (envelope-from peterjeremy@optushome.com.au) Received: from fallbackmx07.syd.optusnet.com.au (fallbackmx07.syd.optusnet.com.au [211.29.132.9]) by mx1.freebsd.org (Postfix) with ESMTP id A569F13C467 for ; Wed, 20 Feb 2008 13:58:18 +0000 (UTC) (envelope-from peterjeremy@optushome.com.au) Received: from mail05.syd.optusnet.com.au (mail05.syd.optusnet.com.au [211.29.132.186]) by fallbackmx07.syd.optusnet.com.au (8.13.1/8.13.1) with ESMTP id m1KB0GCI002989 for ; Wed, 20 Feb 2008 22:00:16 +1100 Received: from server.vk2pj.dyndns.org (c220-239-20-82.belrs4.nsw.optusnet.com.au [220.239.20.82]) by mail05.syd.optusnet.com.au (8.13.1/8.13.1) with ESMTP id m1KAxwOs005659 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Wed, 20 Feb 2008 21:59:59 +1100 Received: from server.vk2pj.dyndns.org (localhost.vk2pj.dyndns.org [127.0.0.1]) by server.vk2pj.dyndns.org (8.14.2/8.14.1) with ESMTP id m1KAxw9v052497; Wed, 20 Feb 2008 21:59:58 +1100 (EST) (envelope-from peter@server.vk2pj.dyndns.org) Received: (from peter@localhost) by server.vk2pj.dyndns.org (8.14.2/8.14.2/Submit) id m1KAxwZY052496; Wed, 20 Feb 2008 21:59:58 +1100 (EST) (envelope-from peter) Date: Wed, 20 Feb 2008 21:59:58 +1100 From: Peter Jeremy To: Jeff Roberson Message-ID: <20080220105958.GO51095@server.vk2pj.dyndns.org> References: <20071219211025.T899@desktop> <18311.49715.457070.397815@grasshopper.cs.duke.edu> <20080112182948.F36731@fledge.watson.org> <20080112170831.A957@desktop> <20080112194521.I957@desktop> <20080219234101.D920@desktop> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="yEPQxsgoJgBvi8ip" Content-Disposition: inline In-Reply-To: <20080219234101.D920@desktop> X-PGP-Key: http://members.optusnet.com.au/peterjeremy/pubkey.asc User-Agent: Mutt/1.5.17 (2007-11-01) Cc: arch@freebsd.org Subject: Re: Linux compatible setaffinity. X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 20 Feb 2008 13:58:19 -0000 --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--