[libvirt] [PATCH 08/17] Introduce virDomainHypervisorPinAdd and virDomainHypervisorPinDel functions

Eric Blake eblake at redhat.com
Mon Aug 6 23:13:53 UTC 2012


On 08/03/2012 12:36 AM, Hu Tao wrote:
> From: Tang Chen <tangchen at cn.fujitsu.com>
> 
> Introduce 2 APIs to support hypervisor threads pin.
>     1) virDomainHypervisorPinAdd: setup hypervisor threads pin with a given cpumap string.
>     2) virDomainHypervisorPinDel: remove all hypervisor threads pin.
> 
> Signed-off-by: Tang Chen <tangchen at cn.fujitsu.com>
> Signed-off-by: Hu Tao <hutao at cn.fujitsu.com>
> ---
>  src/conf/domain_conf.c   |   71 ++++++++++++++++++++++++++++++++++++++++++++++
>  src/conf/domain_conf.h   |    6 ++++
>  src/libvirt_private.syms |    2 ++
>  3 files changed, 79 insertions(+)

Yuck.  More code duplication.  These new functions share code in part
with the existing vcpupin code (that is, the notion of which thread to
pin differs based on vcpu id vs. all other hypervisor threads, but once
you have a thread or set of threads to pin, the work of actually pinning
it, and the work of representing the pinning map in XML, should be
common between the two).

But if you overlook the need to refactor this code, then what you have
done is an accurate, albeit hard-to-maintain, mirror of what the vcpupin
code was doing.

-- 
Eric Blake   eblake at redhat.com    +1-919-301-3266
Libvirt virtualization library http://libvirt.org

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 620 bytes
Desc: OpenPGP digital signature
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20120806/87de16a9/attachment-0001.sig>


More information about the libvir-list mailing list