于 2011年05月06日 17:23, Daniel P. Berrange 写道:
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
This make sense, as you said in another mail, perhaps we need to do some
work on __virExec, will make v2 series. Thanks for feedback.
Regards
Osier