[fedora-virt] Where can I find information on pinning the host os to a cpu set in RHEL6?

Richard W.M. Jones rjones at redhat.com
Wed Dec 1 22:18:13 UTC 2010


On Wed, Dec 01, 2010 at 02:52:22PM -0700, Eric Blake wrote:
> On 12/01/2010 02:41 PM, Richard W.M. Jones wrote:
> > On Wed, Dec 01, 2010 at 02:11:34PM +0100, Henry Pepper wrote:
> >> Hi
> >>
> >> I'm trying to find out how I can pin the host OS to a cpu set, e.g.
> >> cpu0 on RHEL6.
> >>
> >> On Xen I simply pin the Domain-0 to a cpu set.
> >>
> >> But I don't seem to be able to identify the host OS in RHEL6/KVM.
> > 
> > Unlike Xen, the host isn't a special sort of guest.  The host is the
> > host, and so you just use standard Linux techniques.
> > 
> > The way I know to do this is to add "isolcpus=..." on the Linux boot
> > command line, although I've not used this for quite a long time and I
> > haven't tried it on RHEL 6.
> > 
> > isolcpus works in reverse: it's the CPUs that you want Linux *not* to
> > run on, so you probably want something like isolcpus=1-3
> 
> libvirt also has an XML notation for cpu pinning; it is part of the
> <vcpu> element, documented
> http://libvirt.org/formatdomain.html#elementsResources (although
> admittedly the libvirt documentation could use more examples).

Although that doesn't work for the host (except maybe for Xen where
the host is a funny sort of guest).

AIUI the reason you have to reboot with isolcpus is that otherwise you
would have to pin every userspace and kernel task, including tasks
that are created after you do the pinning.

Rich.

-- 
Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones
libguestfs lets you edit virtual machines.  Supports shell scripting,
bindings from many languages.  http://et.redhat.com/~rjones/libguestfs/
See what it can do: http://et.redhat.com/~rjones/libguestfs/recipes.html


More information about the virt mailing list