[libvirt] [PATCH 4/5] qemu: Build command line for NUMA tuning

Daniel P. Berrange berrange at redhat.com
Fri May 6 09:23:42 UTC 2011


On Thu, May 05, 2011 at 04:30:30PM -0400, Bill Gray wrote:
> 
> Hi Daniel,
> 
> How can we get NUMA-aligned memory and CPUs if we apply binding APIs
> after the process has already started?   Might not all the memory
> already be allocated on the wrong nodes by then?

The policy has to be set after fork'ing the new QEMU process, but
before exec'ing QEMU. This is essentially what you're doing with
numactl, but with the problem of an extra binary that screws up
the SELinux domain transitions from libvirtd_t -> svirt_t.

> For expert users, what are the problems with starting qemu with an
> external numactl command (with --cpunodebind and --membind) to
> guarantee optimal alignment?

Adding an intermediate process will prevent the neccessary SELinux
domain transitions from working. We don't want to allow the
numactl binary to be able to transition to svirt_t because that
would be inappropriate for most users of numactl

Daniel
-- 
|: http://berrange.com      -o-    http://www.flickr.com/photos/dberrange/ :|
|: http://libvirt.org              -o-             http://virt-manager.org :|
|: http://autobuild.org       -o-         http://search.cpan.org/~danberr/ :|
|: http://entangle-photo.org       -o-       http://live.gnome.org/gtk-vnc :|




More information about the libvir-list mailing list