Re: getaffinity/setaffinity and cpu sets.
- From: Ceri Davies <ceri@xxxxxxxxxxxxx>
- Date: Fri, 22 Feb 2008 15:53:00 +0000
On Thu, Feb 21, 2008 at 01:39:42PM -1000, Jeff Roberson wrote:
On Thu, 21 Feb 2008, Ceri Davies wrote:
On Thu, Feb 21, 2008 at 09:27:41AM +0000, Robert Watson wrote:
- You don't mention what happens if a process's cpu set changes to preclude a
CPU the process has a thread with affinity for. Online, you suggested
SIGKILL, and I thought maybe a new SIGCPUGONE with a default SIGKILL action
might be a friendlier model. We should see what Solaris and others do here
though. I like the idea that the affinity is a guarantee in userspace
because it means that you can rely on it; I'm OK with the idea that your
thread always runs on the CPUs you have affinity for unless in the
SIGCPUGONE handler :-).
If a processor set disappears from under a process on Solaris, the
process gets moved to the "default" set (or, in other words, they aren't
in a set any more).
Yes, that's ok, but what if the process has requested a specific cpu that
it's now no longer allowed to access? The sets are seperate from the
thread's specific requested binding. If the thread binds to a specific
processor within the set and the set disappears what should we do? What if
that process was relying on the binding to access cpu specific features
such as tsc? Allowing it to migrate could then break the code.
OK, I was talking about processor sets; in Solaris, binding to a set
(pset_bind()) and binding to a specific processor (processor_bind()) are
different operations.
A processor that has LWPs bound to it specifically (with processor_bind())
may not be taken offline or marked as spare, unless the operation is forced,
whereupon forcing removes the binding. Since this is an administrative
choice, it's acceptable.
Ceri
--
That must be wonderful! I don't understand it at all.
-- Moliere
Attachment:
pgp2plJOFAf9l.pgp
Description: PGP signature
- References:
- Re: Linux compatible setaffinity.
- From: Jeff Roberson
- Re: Linux compatible setaffinity.
- From: Robert Watson
- Re: Linux compatible setaffinity.
- From: Jeff Roberson
- Re: Linux compatible setaffinity.
- From: Robert Watson
- Re: Linux compatible setaffinity.
- From: David Xu
- Re: Linux compatible setaffinity.
- From: Jeff Roberson
- getaffinity/setaffinity and cpu sets.
- From: Jeff Roberson
- Re: getaffinity/setaffinity and cpu sets.
- From: Robert Watson
- Re: getaffinity/setaffinity and cpu sets.
- From: Ceri Davies
- Re: getaffinity/setaffinity and cpu sets.
- From: Jeff Roberson
- Re: Linux compatible setaffinity.
- Prev by Date: Re: getaffinity/setaffinity and cpu sets.
- Next by Date: Re: getaffinity/setaffinity and cpu sets.
- Previous by thread: Re: getaffinity/setaffinity and cpu sets.
- Next by thread: Re: getaffinity/setaffinity and cpu sets.
- Index(es):
Relevant Pages
|