Re: SMP: bind process to cpu

From: Francis Galiegue (fg@mandrakesoft.com)
Date: Sat Feb 17 2001 - 14:57:10 EST


On Sat, 17 Feb 2001, Thomas Widmann wrote:

>
> #cat /proc/1310/cpus_allowed
> ffffffff
>
> Now, if i want to run this process on only one cpu, i which way
> do i have to set the bitmask ?
> Let's say, i want to run it on cpu0. how look's the bitmask ?
>

Wild guess: as this is a bitmask, you must "or" the bitmask with (1 <<
cpu_number). 1 for CPU 0 only, 5 for CPU 0 and 2, etc, etc.

-- 
Francis Galiegue, fg@mandrakesoft.com - Normand et fier de l'Ítre
"Programming is a race between programmers, who try and make more and more
idiot-proof software, and universe, which produces more and more remarkable
idiots. Until now, universe leads the race"  -- R. Cook

- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Fri Feb 23 2001 - 21:00:16 EST