Re: [RFC PATCH v1 14/15] node_device_udev: Don't take `mdevctl` lock for querying `mdevctl list`

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Reviewed-by: Boris Fiuczynski <fiuczy@xxxxxxxxxxxxx>

On 4/12/24 15:36, Marc Hartmayer wrote:
There is no reason to serialize the `mdevctl list` calls.

Signed-off-by: Marc Hartmayer <mhartmay@xxxxxxxxxxxxx>
---
  src/node_device/node_device_udev.c | 7 +------
  1 file changed, 1 insertion(+), 6 deletions(-)

diff --git a/src/node_device/node_device_udev.c b/src/node_device/node_device_udev.c
index 9282afdd3241..77c35f981b66 100644
--- a/src/node_device/node_device_udev.c
+++ b/src/node_device/node_device_udev.c
@@ -70,8 +70,7 @@ struct _udevEventData {
      bool udevThreadQuit;
      bool udevDataReady;
- /* Protects @mdevctlMonitors and must be taken when `mdevctl` command is
-     * called to make sure only one thread can query mdevctl at a time. */
+    /* Protects @mdevctlMonitors */
      virMutex mdevctlLock;
      GList *mdevctlMonitors;
      int mdevctlTimeout;
@@ -2318,10 +2317,6 @@ static void nodeDeviceEventHandler(void *data, void *opaque)
      break;
      case NODE_DEVICE_EVENT_UPDATE:
      {
-        udevEventData *priv = driver_state->privateData;
-        /* ensure only a single thread can query mdevctl at a time */
-        VIR_LOCK_GUARD lock = virLockGuardLock(&priv->mdevctlLock);
-
          if (nodeDeviceUpdateMediatedDevices(driver_state) < 0)
              VIR_WARN("mdevctl failed to update mediated devices");
      }

--
Mit freundlichen Grüßen/Kind regards
   Boris Fiuczynski

IBM Deutschland Research & Development GmbH
Vorsitzender des Aufsichtsrats: Wolfgang Wendt
Geschäftsführung: David Faller
Sitz der Gesellschaft: Böblingen
Registergericht: Amtsgericht Stuttgart, HRB 243294
_______________________________________________
Devel mailing list -- devel@xxxxxxxxxxxxxxxxx
To unsubscribe send an email to devel-leave@xxxxxxxxxxxxxxxxx




[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]

  Powered by Linux