[libvirt] [PATCH 10/17] Introduce qemudDomainPinHypervisorFlags and qemudDomainGetHypervisorPinInfo in qemu driver.

Eric Blake eblake at redhat.com
Mon Aug 6 23:41:20 UTC 2012


On 08/03/2012 12:36 AM, Hu Tao wrote:
> From: Tang Chen <tangchen at cn.fujitsu.com>

Again, a subject line longer than 80 columns.  I suggest the much shorter:

qemu: support hypervisor pinning

> 
> Introduce 2 APIs to support hypervisor threads pin in qemu driver.
>     1) qemudDomainPinHypervisorFlags: setup hypervisor threads pin info.
>     2) qemudDomainGetHypervisorPinInfo: get all hypervisor threads pin info.

Depending on the answer to 9/17, you may not need these functions, so
much as tweaking the existing vcpupin functions to take a new flag.

>  static int
> +qemudDomainPinHypervisorFlags(virDomainPtr dom,
> +                              unsigned char *cpumap,
> +                              int maplen,
> +                              unsigned int flags)
> +{

Again, this is a lot of code duplication; refactoring things into common
helper routines would make me feel better (in fact, using a flag would
be a form of refactoring; the bulk of the code between vcpupin and
hypervisor pin is then shared, with the difference being the flag that
controls which one to pin).

> @@ -13255,6 +13476,8 @@ static virDriver qemuDriver = {
>      .domainPinVcpu = qemudDomainPinVcpu, /* 0.4.4 */
>      .domainPinVcpuFlags = qemudDomainPinVcpuFlags, /* 0.9.3 */
>      .domainGetVcpuPinInfo = qemudDomainGetVcpuPinInfo, /* 0.9.3 */
> +    .domainPinHypervisorFlags = qemudDomainPinHypervisorFlags, /* 0.9.13 */
> +    .domainGetHypervisorPinInfo = qemudDomainGetHypervisorPinInfo, /* 0.9.13 */

0.10.0 now.

-- 
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/75f2f44d/attachment-0001.sig>


More information about the libvir-list mailing list