Re: getaffinity/setaffinity and cpu sets.



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).

Ceri
--
That must be wonderful! I don't understand it at all.
-- Moliere

Attachment: pgpdbtH66gcjq.pgp
Description: PGP signature



Relevant Pages

  • Re: [Lse-tech] [PATCH] cpusets - big numa cpu and memory placement
    ... > replacement/modification to the CPU affinity mechanism basically adding ... > affinity mask). ... Then when you want to do something like take a CPU away ...
    (Linux-Kernel)
  • Re: Hyper Threading Issues
    ... Open Task Manager by pressing Control+Alt+Delete then right click on the ... process, then set affinity. ... Now check which CPU you want it to use;) ... >>>>I flash bios with latest version, Enabled Ht from Bios, ...
    (microsoft.public.windowsxp.hardware)
  • Re: 2.6.11-mm2
    ... Can cpu affinity really be changed for a running process? ... It works fine to bound a new process to a cpu set, ... pid 8277's current affinity list: ...
    (Linux-Kernel)
  • Re: Linux compatible setaffinity.
    ... int cpuaffinity; ... Get or set affinity and fetch from or store into mask. ... If pid is specified on set all threads in the pid are set to the requested affinity. ... I can implement them in 4BSD but it will be very inefficient in some edge cases since each cpu doesn't have its own run queue. ...
    (freebsd-arch)
  • Re: GetCurrentProcessorNumber() for XP?
    ... Well, if you set the affinity, you know on what process you'll be running ... executing the appropriate cpuid instruction, ... logical CPU. ... APIC ID in the map I increment a processor number counter and assign it ...
    (microsoft.public.win32.programmer.kernel)