Re: [PATCH] vfio/pci: Separate SR-IOV VF dev_set

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

 



On 2025/6/27 06:56, Alex Williamson wrote:
In the below noted Fixes commit we introduced a reflck mutex to allow
better scaling between devices for open and close.  The reflck was
based on the hot reset granularity, device level for root bus devices
which cannot support hot reset or bus/slot reset otherwise.  Overlooked
in this were SR-IOV VFs, where there's also no bus reset option, but
the default for a non-root-bus, non-slot-based device is bus level
reflck granularity.

The reflck mutex has since become the dev_set mutex and is our defacto
serialization for various operations and ioctls.  It still seems to be
the case though that sets of vfio-pci devices really only need

a nit: not sure if mentioning 2cd8b14aaa66 which convers reflck to dev_set
mutex is helpful. Perhaps, it's welcomed by people working on backporting. :)

serialization relative to hot resets affecting the entire set, which
is not relevant to SR-IOV VFs.  As described in the Closes link below,
this serialization contributes to startup latency when multiple VFs
sharing the same "bus" are opened concurrently.

Mark the device itself as the basis of the dev_set for SR-IOV VFs.

Reported-by: Aaron Lewis <aaronlewis@xxxxxxxxxx>
Closes: https://lore.kernel.org/all/20250626180424.632628-1-aaronlewis@xxxxxxxxxx
Tested-by: Aaron Lewis <aaronlewis@xxxxxxxxxx>
Fixes: e309df5b0c9e ("vfio/pci: Parallelize device open and release")
Signed-off-by: Alex Williamson <alex.williamson@xxxxxxxxxx>
---
  drivers/vfio/pci/vfio_pci_core.c | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)

Reviewed-by: Yi Liu <yi.l.liu@xxxxxxxxx>

Regards,
Yi Liu




[Index of Archives]     [KVM ARM]     [KVM ia64]     [KVM ppc]     [Virtualization Tools]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Questions]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux