Re: [PATCH 08/17] Introduce virDomainHypervisorPinAdd and virDomainHypervisorPinDel functions

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 08/03/2012 12:36 AM, Hu Tao wrote:
> From: Tang Chen <tangchen@xxxxxxxxxxxxxx>
> 
> 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@xxxxxxxxxxxxxx>
> Signed-off-by: Hu Tao <hutao@xxxxxxxxxxxxxx>
> ---
>  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@xxxxxxxxxx    +1-919-301-3266
Libvirt virtualization library http://libvirt.org

Attachment: signature.asc
Description: OpenPGP digital signature

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list

[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]