[PATCH v2 00/20] node_dev_udev: use workerpool and improve nodedev events

Marc Hartmayer posted 20 patches 1 week, 4 days ago
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/libvirt tags/patchew/20240423180906.16164-1-mhartmay@linux.ibm.com
src/node_device/node_device_driver.h |   5 +-
src/util/virmdev.h                   |   4 +
src/conf/node_device_conf.c          |  10 +-
src/node_device/node_device_driver.c |  28 +-
src/node_device/node_device_udev.c   | 516 ++++++++++++++++++---------
src/test/test_driver.c               |  11 +-
src/util/virmdev.c                   |  20 ++
src/libvirt_private.syms             |   2 +
8 files changed, 398 insertions(+), 198 deletions(-)
[PATCH v2 00/20] node_dev_udev: use workerpool and improve nodedev events
Posted by Marc Hartmayer 1 week, 4 days ago
When an udev event occurs for a mediated device (mdev) the mdev config data
requires an update via mdevctl as the udev event does not contain all config
data. This update needs to occur immediately and to be finished before the
libvirt nodedev event is issued to keep the API usage reliable.

Changelog:
v1->v2:
 + squashed old patches 3 and 17 (comments from Jonathon and Boris)
 + added r-b's from Jonathon and Boris
 + worked in comments from Jonathon to old patch 15
 + added comment why only one worker can currently be used
 + added patch `node_device_udev: remove incorrect G_GNUC_UNUSED`
RFCv1->v1:
 + removed some of my own s-o-b's that were accidentally inserted in the RFC
 + added r-b's from Boris and Jonathon
 + worked in comments from Boris and Jonathon, but I did not inline
   "nodeDeviceDefResetMdevActiveConfig" as I'm not sure whether this improves
   the readability
 + reworked patch "[RFC PATCH v1 11/15] node_device_udev: Use
   `stateShutdownPrepare` and `stateShutdownWait`"
 + reworked patch "node_device_udev: Use a worker pool for processing events and
   emitting nodedev event"
 + added patches:
   - node_device_udev: Move responsibility to release `(init|udev)Thread` to `udevEventDataDispose`
   - node_device_udev: Fix leak of mdevctlLock, udevThreadCond, and mdevCtlMonitor
   - node_device_udev: nodeStateShutdownPrepare: Disconnect the signals explicitly
   - node_device_udev: Pass the driver state as parameter in prepartion for the next commit
   - node_device_udev: Add support for `g_autoptr` to `udevEventData
   - node_device_udev: Pass the `udevEventData` via parameter and use refcounting

Boris Fiuczynski (3):
  nodedev: fix mdev add udev event data handling
  nodedev: immediate update of active config on udev events
  nodedev: reset active config data on udev remove event

Marc Hartmayer (17):
  node_device_udev: Set @def to NULL
  node_device_udev: Remove the timeout if the data is disposed
  node_device_udev: Test for mdevctlTimeout != -1
  node_device_udev: Don't take `mdevctlLock` for `mdevctl list` and add
    comments about locking
  node_device_udev: Take lock if `driver->privateData` is modified
  node_device_udev: Add prefix `udev` for udev related data
  node_device_udev: Inline `udevRemoveOneDevice`
  node_device_udev: Move responsibility to release `(init|udev)Thread`
    to `udevEventDataDispose`
  node_device_udev: Fix leak of mdevctlLock, udevThreadCond, and
    mdevCtlMonitors
  node_device_udev: Introduce and use `stateShutdownPrepare` and
    `stateShutdownWait`
  node_device_udev: nodeStateShutdownPrepare: Disconnect the signals
    explicitly
  node_device_udev: Pass the driver state as parameter in preparation
    for the next commit
  node_device_udev: Use a worker pool for processing events and emitting
    nodedev event
  node_device_udev: Make the code easier to read
  node_device_udev: Add support for `g_autoptr` to `udevEventData`
  node_device_udev: Pass the `udevEventData` via parameter and use
    refcounting
  node_device_udev: remove incorrect G_GNUC_UNUSED

 src/node_device/node_device_driver.h |   5 +-
 src/util/virmdev.h                   |   4 +
 src/conf/node_device_conf.c          |  10 +-
 src/node_device/node_device_driver.c |  28 +-
 src/node_device/node_device_udev.c   | 516 ++++++++++++++++++---------
 src/test/test_driver.c               |  11 +-
 src/util/virmdev.c                   |  20 ++
 src/libvirt_private.syms             |   2 +
 8 files changed, 398 insertions(+), 198 deletions(-)


base-commit: c38720b337f74337ec94c0fe2e97a7c2c57188ae
-- 
2.34.1
_______________________________________________
Devel mailing list -- devel@lists.libvirt.org
To unsubscribe send an email to devel-leave@lists.libvirt.org