[libvirt] [PATCH v3 0/6] Implement Add/Del IOThreads

John Ferlan jferlan at redhat.com
Wed Apr 15 01:18:20 UTC 2015


v2:
http://www.redhat.com/archives/libvir-list/2015-April/msg00426.html

Differences:

Patch 1 (old patch 3):

 - virDomainIOThreadIDDefParseXML:
   - Fix error message for <id> (was element, change to attribute for
     <iothread> element)
   - Silently bump the 'def->iothreads' count if there are a more
     <iothreadid> elements found than def->iothreads defined rather than
     causing an error
 - virDomainIOThreadIDAdd
   - Just use VIR_APPEND_ELEMENT - no need for empty array check
 - Remove virDomainIOThreadIDIsDuplicate
   - Since it was doing essentially the same as virDomainIOThreadIDFind
   - Replace callers of IDIsDuplicate with the IDFind
 - Remove 'name' from _virDomainIOThreadIDDef causes ripple effect...
   - formatdomain.html.in and docs/schemas/domaincommon.rng
   - No need for virDomainIOThreadIDDefFree
   - Change of parameters to virDomainIOThreadIDAdd
   - Remove parse in virDomainIOThreadIDDefParseXML
   - Remove format in virDomainDefFormatInternal
 - Remove virDomainIOThreadIDDefFree
   - Unnecessary since 'name' is removed

Patch 2 (merged old patch 4 & 5)

  - Add 'thread_id' to virDomainIOThreadIDDef and remove from
    _qemuDomainObjPrivate. Adjust qemuDomainObjPrivateFree,
    qemuDomainObjPrivateXMLFormat, and qemuDomainObjPrivateXMLParse
    to remove the the iothreadpids usage.  Rely on saved domain XML
    for the 'live' data.

  - Use vm->def->niothreadids instead of priv->niothreadpids

  - Remove a couple of (now) unnecessary checks where priv->[n]iothreadpids
    was referenced.  Now we now that at XMLParse we've created the
    [vm->]def->iothreadids with enough elements to satisfy the maximum
    of def->iothreads and def->niothreadids, so no need to check if it
    exists like we had to for priv->iothreadpids

Patch 3 (old patch 6)

 - Remove 'name' from virDomainAddIOThread

 - Fix comments in virDomainIOThreadAdd and virDomainIOThreadDel

 - Remove if ((unsigned short) iothread_id != iothread_id) check

Patch 4 (old patch 7)

 - Remove 'name' from remote_domain_add_iothread_args and
   remote_domain_add_iothread_args

Patch 5 (old patch 8)

 - Split qemuDomainHotplugIOThread into qemuDomainHotplugAddIOThread and
   qemuDomainHotplugDelIOThread

 - Removed extraneous comments

 - Moved active domain check to after job starts and only for LIVE

 - Removed the virResetLastError if qemuMonitorGetIOThreads fails

 - Didn't touch the Numatune change - that can be resolved separately

 - For the Add case, there was a comment about already having the data
   which while true, we don't know where in the returned qemu iothreads
   list the new IOThread was added, so we have to find it in the list so
   we can get the thread_id so save once we create the element in the
   iothreadids list.

 - Moved where the virDomainLiveConfigHelperMethod was called

 - For an inactive config - we can add iothreads and iothreadids, when/if
   someone starts the guest, then they'll get the bad news if the right
   emulator wasn't available.

 - Handling LIVE before CONFIG just seemed to be the norm for commands
   that I looked at, so I left it that way.


Patch 6 (old patch 9)

 - Remove "name" (avoided the one comment from the review)


John Ferlan (6):
  conf: Add new domain XML element 'iothreadids'
  qemu: Use domain iothreadids to IOThread's 'thread_id'
  Implement virDomainAddIOThread and virDomainDelIOThread
  remote: Add support for AddIOThread and DelIOThread
  qemu: Add support to Add/Delete IOThreads
  virsh: Add iothreadadd and iothreaddel commands

 docs/formatdomain.html.in                          |  30 ++
 docs/schemas/domaincommon.rng                      |  12 +
 include/libvirt/libvirt-domain.h                   |   6 +
 src/conf/domain_audit.c                            |   9 +
 src/conf/domain_audit.h                            |   6 +
 src/conf/domain_conf.c                             | 190 ++++++++-
 src/conf/domain_conf.h                             |  16 +
 src/driver-hypervisor.h                            |  12 +
 src/libvirt-domain.c                               | 118 ++++++
 src/libvirt_private.syms                           |   4 +
 src/libvirt_public.syms                            |   6 +
 src/qemu/qemu_cgroup.c                             |  22 +-
 src/qemu/qemu_command.c                            |  38 +-
 src/qemu/qemu_command.h                            |   3 +
 src/qemu/qemu_domain.c                             |  36 --
 src/qemu/qemu_domain.h                             |   3 -
 src/qemu/qemu_driver.c                             | 466 ++++++++++++++++++++-
 src/qemu/qemu_process.c                            |  37 +-
 src/remote/remote_driver.c                         |   2 +
 src/remote/remote_protocol.x                       |  30 +-
 src/remote_protocol-structs                        |  12 +
 .../qemuxml2argv-iothreads-ids-partial.args        |  10 +
 .../qemuxml2argv-iothreads-ids-partial.xml         |  33 ++
 .../qemuxml2argv-iothreads-ids.args                |   8 +
 .../qemuxml2argv-iothreads-ids.xml                 |  33 ++
 tests/qemuxml2argvtest.c                           |   2 +
 tests/qemuxml2xmltest.c                            |   2 +
 tools/virsh-domain.c                               | 164 ++++++++
 tools/virsh.pod                                    |  31 ++
 29 files changed, 1239 insertions(+), 102 deletions(-)
 create mode 100644 tests/qemuxml2argvdata/qemuxml2argv-iothreads-ids-partial.args
 create mode 100644 tests/qemuxml2argvdata/qemuxml2argv-iothreads-ids-partial.xml
 create mode 100644 tests/qemuxml2argvdata/qemuxml2argv-iothreads-ids.args
 create mode 100644 tests/qemuxml2argvdata/qemuxml2argv-iothreads-ids.xml

-- 
2.1.0




More information about the libvir-list mailing list