Jiri Denemark wrote:
> Hello,
>
> What is the best way of assigning whole CPUs to contexts? Simplified
> example:
> 2 contexts on 2-CPU machine, each context should be provided with a single
> CPU. If only one context is running, it can still consume only one CPU,
> the
> other one stays idle.
If this is what you want, using the scheduler parameters is just
unnecessary overhead. Setup cpusets instead, e.g.:
echo 0 > /etc/vservers/<guest0>/cpuset/cpus
echo 0 > /etc/vservers/<guest0>/cpuset/mems
echo cpu0 > /etc/vservers/<guest0>/cpuset/name
echo 1 > /etc/vservers/<guest1>/cpuset/cpus
echo 0 > /etc/vservers/<guest1>/cpuset/mems
echo cpu1 > /etc/vservers/<guest1>/cpuset/name
Note that mems for guest1 might be different - it depends on whether your
system is NUMA or not.
This also assumes that you have /dev/cpuset mounted.
-- Daniel Hokka ZakrissonReceived on Wed Apr 23 22:38:27 2008