From owner-freebsd-arch@FreeBSD.ORG Fri Jan 11 19:23:46 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 E111816A417 for ; Fri, 11 Jan 2008 19:23:46 +0000 (UTC) (envelope-from gallatin@cs.duke.edu) Received: from duke.cs.duke.edu (duke.cs.duke.edu [152.3.140.1]) by mx1.freebsd.org (Postfix) with ESMTP id A35A613C43E for ; Fri, 11 Jan 2008 19:23:46 +0000 (UTC) (envelope-from gallatin@cs.duke.edu) Received: from grasshopper.cs.duke.edu (grasshopper.cs.duke.edu [152.3.145.30]) by duke.cs.duke.edu (8.14.0/8.14.0) with ESMTP id m0BJNauZ013938 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Fri, 11 Jan 2008 14:23:37 -0500 (EST) Received: (from gallatin@localhost) by grasshopper.cs.duke.edu (8.12.9p2/8.12.9/Submit) id m0BJN8Tk008940; Fri, 11 Jan 2008 14:23:08 -0500 (EST) (envelope-from gallatin) From: Andrew Gallatin MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Message-ID: <18311.49715.457070.397815@grasshopper.cs.duke.edu> Date: Fri, 11 Jan 2008 14:23:08 -0500 (EST) To: Jeff Roberson In-Reply-To: <20071219211025.T899@desktop> References: <20071219211025.T899@desktop> X-Mailer: VM 6.75 under 21.1 (patch 12) "Channel Islands" XEmacs Lucid 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: Fri, 11 Jan 2008 19:23:47 -0000 Jeff Roberson writes: > I have implemented a linux compatible sched_setaffinity() call which is > somewhat crippled. This allows a userspace process to supply a bitmask of > processors which it will run on. I have copied the linux interface such > that it should be api compatible because I believe it is a sensible > interface and they beat us to it by 3 years. I'm somewhat surprised that this has not hit the tree yet. What happened? Wasn't the consensus that it was a good thing? 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. Thanks for working on this, Drew