
On 09/03/2014 12:15 PM, John Ferlan wrote: <...snip...>
John Ferlan (7): virsh: Add iothread to 'attach-disk' qemu: Issue query-iothreads and to get list of active IOThreads vircgroup: Introduce virCgroupNewIOThread qemu_domain: Add niothreadpids and iothreadpids qemu_cgroup: Introduce cgroup functions for IOThreads qemu: Allow pinning specific IOThreads to a CPU domain_conf: Add iothreadpin to cputune
docs/formatdomain.html.in | 18 +++ docs/schemas/domaincommon.rng | 10 ++ src/conf/domain_conf.c | 124 +++++++++++++++++++-- src/conf/domain_conf.h | 2 + src/libvirt_private.syms | 1 + src/qemu/qemu_cgroup.c | 104 +++++++++++++++++ src/qemu/qemu_cgroup.h | 5 + src/qemu/qemu_domain.c | 36 ++++++ src/qemu/qemu_domain.h | 3 + src/qemu/qemu_driver.c | 8 ++ src/qemu/qemu_monitor.c | 41 +++++++ src/qemu/qemu_monitor.h | 12 ++ src/qemu/qemu_monitor_json.c | 91 +++++++++++++++ src/qemu/qemu_monitor_json.h | 4 + src/qemu/qemu_process.c | 96 ++++++++++++++++ src/util/vircgroup.c | 43 +++++++ src/util/vircgroup.h | 6 + tests/qemumonitorjsontest.c | 71 ++++++++++++ .../qemuxml2argv-cputune-iothreads.xml | 38 +++++++ tests/qemuxml2xmltest.c | 1 + tools/virsh-domain.c | 13 ++- tools/virsh.pod | 5 +- 22 files changed, 717 insertions(+), 15 deletions(-) create mode 100644 tests/qemuxml2argvdata/qemuxml2argv-cputune-iothreads.xml
Thanks for the reviews - along with the VIR_FREE(tmp) in 7, I also squashed and pushed the following into patch 6 & 7 respectively due to a dogfooding experiment with my Coverity scan John Patch 6: (would have been a NEGATIVE_RETURNS due niothreads) diff --git a/src/qemu/qemu_process.c b/src/qemu/qemu_process.c index cd1b431..6c412db 100644 --- a/src/qemu/qemu_process.c +++ b/src/qemu/qemu_process.c @@ -2131,9 +2131,11 @@ qemuProcessDetectIOThreadPIDs(virQEMUDriverPtr driver, ret = 0; cleanup: - for (i = 0; i < niothreads; i++) - qemuMonitorIOThreadsInfoFree(iothreads[i]); - VIR_FREE(iothreads); + if (iothreads) { + for (i = 0; i < niothreads; i++) + qemuMonitorIOThreadsInfoFree(iothreads[i]); + VIR_FREE(iothreads); + } return ret; } Patch 7: (iothreadid was uninitialized if tmp was NULL) diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c index bb09720..9cb3ebd 100644 --- a/src/conf/domain_conf.c +++ b/src/conf/domain_conf.c @@ -11513,9 +11513,8 @@ virDomainVcpuPinDefParseXML(xmlNodePtr node, def->vcpuid = vcpuid; } - if (iothreads) { - tmp = virXPathString("string(./@iothread)", ctxt); - if (tmp && virStrToLong_uip(tmp, NULL, 10, &iothreadid) < 0) { + if (iothreads && (tmp = virXPathString("string(./@iothread)", ctxt))) { + if (virStrToLong_uip(tmp, NULL, 10, &iothreadid) < 0) { virReportError(VIR_ERR_XML_ERROR, _("invalid setting for iothread '%s'"), tmp); goto error;