Date: Sat, 12 Jan 2008 10:06:14 -0500 (EST) From: Daniel Eischen <deischen@freebsd.org> To: =?utf-8?Q?Dag-Erling_Sm=C3=B8rgrav?= <des@des.no> Cc: arch@freebsd.org, Andrew Gallatin <gallatin@cs.duke.edu> Subject: Re: Linux compatible setaffinity. Message-ID: <Pine.GSO.4.64.0801120952550.12677@sea.ntplx.net> In-Reply-To: <863at36v7z.fsf@ds4.des.no> References: <20071219211025.T899@desktop> <18311.49715.457070.397815@grasshopper.cs.duke.edu> <Pine.GSO.4.64.0801111550080.8359@sea.ntplx.net> <863at36v7z.fsf@ds4.des.no>
next in thread | previous in thread | raw e-mail | index | archive | help
On Sat, 12 Jan 2008, Dag-Erling Smørgrav wrote:
> Daniel Eischen <deischen@freebsd.org> 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.
--
DE
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.GSO.4.64.0801120952550.12677>
