Re: [PATCH 0/8] RFC: vcpu pinning at qemu start

Anthony Liguori
2008-03-05T14:29:47Z

Avi Kivity wrote:
> Affinity control is probably useful mostly for numa configurations,
> where you want to restrict virtual cpus to run on the cores closest to
> memory. However it may well be that the scheduler is already good
> enough to do this on its own.

In that case, you need to use numactl to set a NUMA policy so it's
pretty natural that you would also be using taskset. Assuming you're
trying to keep a VM local to a particular node (we don't expose a
virtual SRAT/SLIT table so that's all we can sanely do right now), it
doesn't matter what CPU each VCPU thread lands on as long as they stay
within the node. So taskset is perfectly capable to address this need
today.

> In the brutal world of hypervisors, if your competitor has a feature,
> you must have it too. I often get asked about cpu pinning in kvm.

And the answer to give is, of course, we support it through taskset :-)

Regards,

Anthony Liguori

> [I'd like to see how Xen implements swapping, though]