From owner-freebsd-arch@FreeBSD.ORG Fri Feb 22 15:53:04 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 0A5A416A404; Fri, 22 Feb 2008 15:53:04 +0000 (UTC) (envelope-from ceri@submonkey.net) Received: from shrike.submonkey.net (cpc3-cdif2-0-0-cust64.cdif.cable.ntl.com [81.106.128.65]) by mx1.freebsd.org (Postfix) with ESMTP id B48AF13C46E; Fri, 22 Feb 2008 15:53:03 +0000 (UTC) (envelope-from ceri@submonkey.net) Received: from ceri by shrike.submonkey.net with local (Exim 4.69 (FreeBSD)) (envelope-from ) id 1JSaCq-000PZp-Qh; Fri, 22 Feb 2008 15:53:00 +0000 Date: Fri, 22 Feb 2008 15:53:00 +0000 From: Ceri Davies To: Jeff Roberson Message-ID: <20080222155300.GA72691@submonkey.net> References: <20080219234101.D920@desktop> <20080220101348.D44565@fledge.watson.org> <20080220005030.Y920@desktop> <20080220105333.G44565@fledge.watson.org> <47BCEFDB.5040207@freebsd.org> <20080220175532.Q920@desktop> <20080220213253.A920@desktop> <20080221092011.J52922@fledge.watson.org> <20080221223749.GJ22033@submonkey.net> <20080221133804.T920@desktop> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="9amGYk9869ThD9tj" Content-Disposition: inline In-Reply-To: <20080221133804.T920@desktop> X-PGP: finger ceri@FreeBSD.org User-Agent: Mutt/1.5.17 (2007-11-01) Sender: Ceri Davies Cc: Daniel Eischen , arch@FreeBSD.org, Robert Watson , David Xu , Andrew Gallatin Subject: Re: getaffinity/setaffinity and cpu sets. 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: Fri, 22 Feb 2008 15:53:04 -0000 --9amGYk9869ThD9tj Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Thu, Feb 21, 2008 at 01:39:42PM -1000, Jeff Roberson wrote: >=20 > On Thu, 21 Feb 2008, Ceri Davies wrote: >=20 >> On Thu, Feb 21, 2008 at 09:27:41AM +0000, Robert Watson wrote: >>=20 >>> - You don't mention what happens if a process's cpu set changes to prec= lude a >>> CPU the process has a thread with affinity for. Online, you suggested >>> SIGKILL, and I thought maybe a new SIGCPUGONE with a default SIGKILL = action >>> might be a friendlier model. We should see what Solaris and others d= o here >>> though. I like the idea that the affinity is a guarantee in userspace >>> because it means that you can rely on it; I'm OK with the idea that y= our >>> thread always runs on the CPUs you have affinity for unless in the >>> SIGCPUGONE handler :-). >>=20 >> If a processor set disappears from under a process on Solaris, the >> process gets moved to the "default" set (or, in other words, they aren't >> in a set any more). >=20 > Yes, that's ok, but what if the process has requested a specific cpu that= =20 > it's now no longer allowed to access? The sets are seperate from the=20 > thread's specific requested binding. If the thread binds to a specific= =20 > processor within the set and the set disappears what should we do? What = if=20 > that process was relying on the binding to access cpu specific features= =20 > such as tsc? Allowing it to migrate could then break the code. OK, I was talking about processor sets; in Solaris, binding to a set (pset_bind()) and binding to a specific processor (processor_bind()) are different operations. A processor that has LWPs bound to it specifically (with processor_bind()) may not be taken offline or marked as spare, unless the operation is forced, whereupon forcing removes the binding. Since this is an administrative choice, it's acceptable. Ceri --=20 That must be wonderful! I don't understand it at all. -- Moliere --9amGYk9869ThD9tj Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.6 (FreeBSD) iD8DBQFHvu/cocfcwTS3JF8RAqyYAJ9ILwO5kCBIzm6+m4nzR7zGh0U50ACeP6Ba EezrE/EO0o/7cp5E2ryb918= =qdXO -----END PGP SIGNATURE----- --9amGYk9869ThD9tj--