These patches satisfy part of:
https://bugzilla.redhat.com/show_bug.cgi?id=1135491
Patches 1 and 2 are fairly straightforward adding a new API type patches
although they were implemented with the thought of how patch 3 works. Also
rather than implement a get iothreads and a get iothreadspin API, I combined
the two into one. I could separate if that's more desirable, but it just
seemed more natural to have one API do both.
Patch 3 adds the qemu related to code to fetch not only the IOThreads
data, but also the cpumap/cpumaplen in order to display the CPU Affinity.
For that I somewhat followed how the vcpuinfo code works, but also a bit
on how the nodecpumap code does things. Unlike the vcpuinfo code, I had
no way to count the IOThreads before calling, so rather than pass in a
cpumap/cpumaplen - I allocated them in the qemu code and passed them back
within the IOThreadsInfo structure. Of course it did get me to thinking
why are we doing 1 for each IOThread, but to that degree I was following
the vcpu model.
Patch 4 is the new 'virsh iothreads' command with no arguments (for now).
It will display the IOThreads of active domains only.
"Future" patches will implement a SetIOThreads API to change the
thread pinning and allow for add/delete of IOThreads. I'm hoping to
use the same command with new options --pin && --cpuset for pinning
the IOThreads or --add/--del to add/remove IOThreads, but I wanted to
make sure I had buyin on the use of one API to accomplish both get of
basic IOThread data and CPU Affinity data.
John Ferlan (4):
Implement public API for virDomainGetIOThreadsInfo
remote: Implement the remote plumbing for virDomainGetIOThreads
qemu: Implement the qemu driver fetch for IOThreads
virsh: Add 'iothreads' command
daemon/remote.c | 75 +++++++++++++++++++++++++-
include/libvirt/libvirt-domain.h | 22 +++++++-
src/driver-hypervisor.h | 8 ++-
src/libvirt-domain.c | 63 +++++++++++++++++++++-
src/libvirt_public.syms | 6 +++
src/qemu/qemu_driver.c | 114 +++++++++++++++++++++++++++++++++++++++
src/remote/remote_driver.c | 82 +++++++++++++++++++++++++++-
src/remote/remote_protocol.x | 29 +++++++++-
src/remote_protocol-structs | 20 +++++++
src/rpc/gendispatch.pl | 1 +
tools/virsh-domain.c | 72 +++++++++++++++++++++++++
tools/virsh.pod | 7 +++
12 files changed, 492 insertions(+), 7 deletions(-)
--
2.1.0