From owner-freebsd-smp@FreeBSD.ORG Fri Feb 23 16:36:18 2007 Return-Path: X-Original-To: freebsd-smp@freebsd.org Delivered-To: freebsd-smp@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 1E38A16A403 for ; Fri, 23 Feb 2007 16:36:18 +0000 (UTC) (envelope-from deischen@freebsd.org) Received: from mail.ntplx.net (mail.ntplx.net [204.213.176.10]) by mx1.freebsd.org (Postfix) with ESMTP id A6BC413C474 for ; Fri, 23 Feb 2007 16:36:17 +0000 (UTC) (envelope-from deischen@freebsd.org) Received: from sea.ntplx.net (sea.ntplx.net [204.213.176.11]) by mail.ntplx.net (8.14.0/8.14.0/NETPLEX) with ESMTP id l1NG9PT0006588; Fri, 23 Feb 2007 11:09:25 -0500 (EST) X-Virus-Scanned: by AMaViS and Clam AntiVirus (mail.ntplx.net) X-Greylist: Message whitelisted by DRAC access database, not delayed by milter-greylist-3.0 (mail.ntplx.net [204.213.176.10]); Fri, 23 Feb 2007 11:09:25 -0500 (EST) Date: Fri, 23 Feb 2007 11:09:25 -0500 (EST) From: Daniel Eischen X-X-Sender: eischen@sea.ntplx.net To: Robert Watson In-Reply-To: <20070223151158.Q88189@fledge.watson.org> Message-ID: References: <07DDDFCFB8BE0A43BCA52E743373DBDC030C5D5A@orsmsx416.amr.corp.intel.com> <20070223151158.Q88189@fledge.watson.org> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed Cc: freebsd-smp@freebsd.org, atmblr@gmail.com, "Kunze, Aaron" Subject: Re: Setting CPU affinity to process( Freebsd smp kernel) X-BeenThere: freebsd-smp@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Daniel Eischen List-Id: FreeBSD SMP implementation group List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 23 Feb 2007 16:36:18 -0000 On Fri, 23 Feb 2007, Robert Watson wrote: > On Wed, 21 Feb 2007, Kunze, Aaron wrote: > >> Does anyone know if this will change any time soon? For example, is anyone >> working on exposing affinity to user-space applications via extensions of >> the pthreads interface? >> >> Sorry to reply to such an old thread... > > I know of no work along these lines currently, but it's something a lot of > people would like to see happen. There's a potential for conflict between > the kernel's use of pinning and binding for kernel synchronization and the > user space affinity model, which will be entirely avoided if done right. :-) > For now, it's quite easy to add a sysctl/syscall that allows user space to > send the kernel scheduler's notion of thread binding, but this isn't really > the right approach. As I understand it, some systems support setting CPU > affinity for a thread as a set of CPUs it is willing to run on ? I know Solaris has processor_bind(2) and pset_bind(2): http://docs.sun.com/app/docs/doc/816-5167/6mbb2jaeu?a=expand#P -- DE