From owner-freebsd-arch@FreeBSD.ORG Sun Jan 13 03:44:24 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 06E4D16A41A; Sun, 13 Jan 2008 03:44:24 +0000 (UTC) (envelope-from deischen@freebsd.org) Received: from mail.netplex.net (mail.netplex.net [204.213.176.10]) by mx1.freebsd.org (Postfix) with ESMTP id CFE6013C461; Sun, 13 Jan 2008 03:44:23 +0000 (UTC) (envelope-from deischen@freebsd.org) Received: from sea.ntplx.net (sea.ntplx.net [204.213.176.11]) by mail.netplex.net (8.14.2/8.14.2/NETPLEX) with ESMTP id m0D3iEfU009779; Sat, 12 Jan 2008 22:44:14 -0500 (EST) X-Virus-Scanned: by AMaViS and Clam AntiVirus (mail.netplex.net) X-Greylist: Message whitelisted by DRAC access database, not delayed by milter-greylist-4.0 (mail.netplex.net [204.213.176.10]); Sat, 12 Jan 2008 22:44:14 -0500 (EST) Date: Sat, 12 Jan 2008 22:44:14 -0500 (EST) From: Daniel Eischen X-X-Sender: eischen@sea.ntplx.net To: Jeff Roberson In-Reply-To: <20080112170831.A957@desktop> Message-ID: References: <20071219211025.T899@desktop> <18311.49715.457070.397815@grasshopper.cs.duke.edu> <20080112182948.F36731@fledge.watson.org> <20080112170831.A957@desktop> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed Cc: arch@freebsd.org, Robert Watson , Andrew Gallatin Subject: Re: Linux compatible setaffinity. X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Daniel Eischen List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 13 Jan 2008 03:44:24 -0000 On Sat, 12 Jan 2008, Jeff Roberson wrote: > Now, there is one problem with the linux api that I want to discuss before I > commit it. The current patch always works on curthread. However, the api > allows for setting the binding of a pid. I believe, although I'm not > certain, that pids and tids in linux are in the same number space. It's not > clear to me whether you can set an affinity for an entire process and have it > effect an individual thread or whether you set it on a thread by thread > basis. When supplying a non-curproc pid do you bind all threads in the > target process? > > Are our tids and pids in the same number space? And are they available to > application programmers? I haven't followed that very carefully. I believe marcel made tids and pids disjoint so that any pid is never equal to any tid. But regardless, I don't think we want to rely on that. I would prefer the Solaris approach of specifying what we want (pid, tid, jail id, etc) as an argument in the API so there is no confusion. -- DE