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

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



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

Attachment: signature.asc
Description: OpenPGP digital signature


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