From owner-freebsd-arch@FreeBSD.ORG Sat Jan 12 15:06:19 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 3907016A421 for ; Sat, 12 Jan 2008 15:06:19 +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 DD0F813C478 for ; Sat, 12 Jan 2008 15:06:18 +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 m0CF6DYZ025702; Sat, 12 Jan 2008 10:06: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 10:06:13 -0500 (EST) Date: Sat, 12 Jan 2008 10:06:14 -0500 (EST) From: Daniel Eischen X-X-Sender: eischen@sea.ntplx.net To: =?utf-8?Q?Dag-Erling_Sm=C3=B8rgrav?= In-Reply-To: <863at36v7z.fsf@ds4.des.no> Message-ID: References: <20071219211025.T899@desktop> <18311.49715.457070.397815@grasshopper.cs.duke.edu> <863at36v7z.fsf@ds4.des.no> MIME-Version: 1.0 Content-Type: MULTIPART/MIXED; BOUNDARY="-559023410-959030623-1200150374=:12677" Cc: arch@freebsd.org, 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: Sat, 12 Jan 2008 15:06:19 -0000 This message is in MIME format. The first part should be readable text, while the remaining parts are likely unreadable without MIME-aware tools. ---559023410-959030623-1200150374=:12677 Content-Type: TEXT/PLAIN; charset=utf-8; format=flowed Content-Transfer-Encoding: QUOTED-PRINTABLE On Sat, 12 Jan 2008, Dag-Erling Sm=C3=B8rgrav wrote: > Daniel Eischen writes: >> I favor the Solaris API which allows you to specify either a process >> or a thread (LWP) and a processor set. > > Cf Kip. Regardless of which API we choose for FreeBSD applications, we > should also implement the Linux API to simplify the porting of Linux > applications. This doesn't sound like a widely used Linux API for which someone couldn't easily figure out how to translate cpu_setaffinity() into: pset_bind(psetid_t pset, idtype_t idtype, id_t id, psetid_t *opset); where id is the process or thread id, and idtype is P_PID or P_TID. The linux compat ABI will want cpu_setaffinity() but that doesn't mean we should provide it natively, when there is an API that isn't as short-sighted as the Linux API. Note that Solaris also has a set of command-line interfaces for binding processors or threads to processors. We've used this in the past, under Solaris 6 or 7 I think, but not under any more recent releases. --=20 DE ---559023410-959030623-1200150374=:12677--