From owner-freebsd-arch@FreeBSD.ORG Sat Jan 12 18:34:07 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 573C616A417 for ; Sat, 12 Jan 2008 18:34:07 +0000 (UTC) (envelope-from rwatson@FreeBSD.org) Received: from cyrus.watson.org (cyrus.watson.org [209.31.154.42]) by mx1.freebsd.org (Postfix) with ESMTP id 12CEF13C442 for ; Sat, 12 Jan 2008 18:34:06 +0000 (UTC) (envelope-from rwatson@FreeBSD.org) Received: from fledge.watson.org (fledge.watson.org [209.31.154.41]) by cyrus.watson.org (Postfix) with ESMTP id 2A07C46DAB; Sat, 12 Jan 2008 13:34:06 -0500 (EST) Date: Sat, 12 Jan 2008 18:34:06 +0000 (GMT) From: Robert Watson X-X-Sender: robert@fledge.watson.org To: Andrew Gallatin In-Reply-To: <18311.49715.457070.397815@grasshopper.cs.duke.edu> Message-ID: <20080112182948.F36731@fledge.watson.org> References: <20071219211025.T899@desktop> <18311.49715.457070.397815@grasshopper.cs.duke.edu> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed 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: Sat, 12 Jan 2008 18:34:07 -0000 On Fri, 11 Jan 2008, Andrew Gallatin wrote: > I'm somewhat surprised that this has not hit the tree yet. What happened? > Wasn't the consensus that it was a good thing? I think Jeff just got busy with other stuff. > FWIW, I was too busy to reply at the time, but I agree that the Apple > interface is nice. However, sometimes one needs a hard CPU binding > interface like this one, and I don't see any reason to defer adding this > interface in favor of the Apple one, since they are somewhat orthogonal. > I'd be strongly in favor of having a hard CPU binding interface. The Apple API is nice in terms of capabilities, but we wouldn't be able to use it directly as it Mach-esque (as I understand it). Of course, Jeff's implementation of the Linux API doesn't actually fully implement the API (it doesn't support constraining the CPU set vs. binding to one CPU, and the patch as-provided didn't support querying the binding). I agree I'd like to see if in the tree, if only because it would let me eliminate local hacks I have that do the same thing, but we should think about other interfaces that are more expressive in the longer term. For example, one thing I like about the Apple interface is the ability to specify general strategies for affinity rather than specific affinities -- "these threads like to be together, but they don't mind where that is". Likewise, the Solaris facility to be able to change a CPU set and have all the things pinned to it follow the centrally-administered set is a nice match for our concept of Jail. Finally, if we do want it to work well with Jail, and we want Jails to be able to be pinned to sets of CPUs, we also need a nested concept of how to handle affinity, in the event that the set of CPUs a Jail is running on changes, in which case perhaps you want relative numbering within the jail, or some other similar notion. Sounds like a nice whiteboard session at the BSDCan developer summit... Robert N M Watson Computer Laboratory University of Cambridge