[libvirt] [PATCH v2 0/4] Fix a couple of iothread bugs
jferlan at redhat.com
Thu Oct 15 20:43:51 UTC 2015
Differences since v1 - many.
- Reworked patches 1 & 2 to become patches 1 - 3 in the new series
- Patch 1 is new, but the thinking behind patch 3 caused me to generate
this patch which essentially changes comparisons with "->iothreads" to
use "->niothreadids" instead except for one place where we're building
the "iothreadids" array based on the difference between iothreads and
- Patch 2 is essentially what former patch 1 became, adding a single
check for niothreads == 0 rather than checking the capabilities bit.
- The former patch 2 was dropped. In it's place is the new Patch 3 which
moves the check for the capabilities bit to when the IOThread objects
are added to the domain at startup time. Making that change had a
couple of side effects and the whole sordid history of how we got into
this situation was left in the commit message. Due to moving the
check one test started failing, so that was fixed and while I was
at it - I added a test which would define iothreads, some iothreadids,
and some iothreadpin to show that without the capability the failure
will be at start time.
- The former patch 3 was already pushed since it was ACK'd
- The former patch 4 logic was adjusted (more or less) to what was
requested during the review with a couple of tweaks based on the
realities I found during testing.
NB: I spent some cycles considering how to handle the case where a
domain with iothreads/niothreadids > 0 was already running when
libvirtd was restarted and how to handle that. In the end I decided
upon trying to do the somewhat nice thing and remove all traces
and if some domain had iothreadid's defined, then leave a VIR_INFO
message indicating the removal.
Without this change, then qemuDomainPinIOThread for the live code
will need some kind of adjustment in order to handle the case where
the capability doesn't exist (some sort of thread_id == 0 check right
after the IOThreadIDFind succeeds).
John Ferlan (4):
qemu: Use 'niothreadids' instead of 'iothreads'
qemu: Check for niothreads == 0 in qemuSetupCgroupForIOThreads
qemu: Fix qemu startup check for QEMU_CAPS_OBJECT_IOTHREAD
conf: Optimize the iothreadid initialization
src/conf/domain_audit.c | 4 +-
src/conf/domain_conf.c | 43 +++++++++++++++++-----
src/qemu/qemu_cgroup.c | 3 ++
src/qemu/qemu_command.c | 19 ++++------
src/qemu/qemu_driver.c | 16 ++++----
src/qemu/qemu_process.c | 32 ++++++++++++++--
.../qemuxml2argv-cputune-numatune.args | 1 +
.../qemuxml2argv-iothreads-nocap.xml | 37 +++++++++++++++++++
tests/qemuxml2argvtest.c | 2 +
9 files changed, 122 insertions(+), 35 deletions(-)
create mode 100644 tests/qemuxml2argvdata/qemuxml2argv-iothreads-nocap.xml
More information about the libvir-list