From owner-freebsd-arch@FreeBSD.ORG Thu Feb 21 21:08:14 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 9093916A403; Thu, 21 Feb 2008 21:08:14 +0000 (UTC) (envelope-from das@FreeBSD.ORG) Received: from zim.MIT.EDU (ZIM.MIT.EDU [18.95.3.101]) by mx1.freebsd.org (Postfix) with ESMTP id 450B813C448; Thu, 21 Feb 2008 21:08:14 +0000 (UTC) (envelope-from das@FreeBSD.ORG) Received: from zim.MIT.EDU (localhost [127.0.0.1]) by zim.MIT.EDU (8.14.2/8.14.2) with ESMTP id m1LL84vo003331; Thu, 21 Feb 2008 16:08:04 -0500 (EST) (envelope-from das@FreeBSD.ORG) Received: (from das@localhost) by zim.MIT.EDU (8.14.2/8.14.2/Submit) id m1LL84Ho003330; Thu, 21 Feb 2008 16:08:04 -0500 (EST) (envelope-from das@FreeBSD.ORG) Date: Thu, 21 Feb 2008 16:08:04 -0500 From: David Schultz To: Jeff Roberson Message-ID: <20080221210804.GA3240@zim.MIT.EDU> Mail-Followup-To: Jeff Roberson , David Xu , Daniel Eischen , Robert Watson , Andrew Gallatin , arch@FreeBSD.ORG References: <20080112170831.A957@desktop> <20080112194521.I957@desktop> <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> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20080220213253.A920@desktop> 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: Thu, 21 Feb 2008 21:08:14 -0000 I have no specific comments, but I wanted to point out that the Solaris kernel team put a lot of thought into coming up with a flexible processor binding API for Solaris 10 that meshes well with jails (a.k.a. zones in Solaris). It might be worthwhile to investigate what good ideas they might have had, and to decide if compatibility is worthwhile: http://src.opensolaris.org/source/xref/onnv/onnv-gate/usr/src/uts/common/sys/pset.h There are manpages for this stuff somewhere. pset_create and pset_destroy obviously create and delete processor set definitions. pset_bind binds a particular process / thread / session / jail to a processor set, similar to your CPU_WHICH_* flags, I think, but with more options.