Re: SMP: bind process to cpu

Thomas Widmann (thomas.widmann@icn.siemens.de)
Sat, 17 Feb 2001 20:08:08 +0100


Hi,

* Andrew Morton wrote:

> > Hi,
> >
> > I run an 3*XEON 550MHz Primergy with 2GB of RAM.
> > On this machine, i have compiled kernel 2.4.0SMP.
> >
> > Is it possible to bind a process to a specific
> > cpu on this SMP machine (process affinity) ?
> >
> > I there something like pset ?
>
> A patch which creates /proc/<pid>/cpus_allowed is at
>
> http://www.uow.edu.au/~andrewm/linux/#cpus_allowed
>
> You just write a bitmask into it.

Thanks for this information. I patched my the kernel with it.
After rebooting with the new kernel i can see the bitmask
for every process running on my server.

#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 ?

Thanks

Regards
Thomas
-
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/