linux_dsm_epyc7002/drivers/vfio/pci
Alex Williamson e309df5b0c vfio/pci: Parallelize device open and release
In commit 61d792562b ("vfio-pci: Use mutex around open, release, and
remove") a mutex was added to freeze the refcnt for a device so that
we can handle errors and perform bus resets on final close.  However,
bus resets can be rather slow and a global mutex here is undesirable.
Evaluating the potential locking granularity, a per-device mutex
provides the best resolution but with multiple devices on a bus all
released concurrently, they'll race to acquire each other's mutex,
likely resulting in no reset at all if we use trylock.  We therefore
lock at the granularity of the bus/slot reset as we're only attempting
a single reset for this group of devices anyway.  This allows much
greater scaling as we're bounded in the number of devices protected by
a single reflck object.

Reported-by: Christian Ehrhardt <christian.ehrhardt@canonical.com>
Tested-by: Christian Ehrhardt <christian.ehrhardt@canonical.com>
Reviewed-by: Eric Auger <eric.auger@redhat.com>
Reviewed-by: Cornelia Huck <cohuck@redhat.com>
Signed-off-by: Alex Williamson <alex.williamson@redhat.com>
2018-12-12 12:51:07 -07:00
..
Kconfig vfio/pci: Make IGD support a configurable option 2018-06-18 16:39:50 -06:00
Makefile
vfio_pci_config.c vfio/pci: Mask buggy SR-IOV VF INTx support 2018-09-25 13:01:27 -06:00
vfio_pci_igd.c
vfio_pci_intrs.c
vfio_pci_private.h vfio/pci: Parallelize device open and release 2018-12-12 12:51:07 -07:00
vfio_pci_rdwr.c vfio/pci: Add ioeventfd support 2018-03-26 13:22:58 -06:00
vfio_pci.c vfio/pci: Parallelize device open and release 2018-12-12 12:51:07 -07:00