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

[libvirt] question for virsh vcpupin enhancement


Now, 'vcpupin'/virDomainPinVcpu() allows users to change vcpu placement
of Guests.

When using qemu, you'll see other threads than vcpus as main thread, iothread...
Such threads may use some amount of cpu time..

But , IIUC, there are no interfaces to move such threads.

So, if I want to add such interfaces, how should I do ?
Now, I have 2 ideas.

1. Enhance vcpupin as

  # virsh vcpupin --vcpu -1 --cpulist xxxxx

  Allow specifiying '-1' to pin all non-vcpu threads.

2. Support cpuset (linux+qemu)

  # virsh cpusettune --cpulist xxxxxx --memlist xxxxxx

  Add interface to use cpuset cgroup and allow users to put
  the whole tasks under a cpuset. Then, all threads under qemu
  can be pinned && vpcupin(sched_setaffinity) can be used under cpuset.

  Off topic:
    IIUC, cpuset supports memory migration. So, if the user changes
    memlist dynamically, pages will be moved to proper node.
    This is an another future enhance, I think.

Better idea is welcome.



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