diff options
author | Alex Williamson <[email protected]> | 2018-12-12 12:51:07 -0700 |
---|---|---|
committer | Alex Williamson <[email protected]> | 2018-12-12 12:51:07 -0700 |
commit | e309df5b0c9e67cc929eedd3e32f4907fa49543e (patch) | |
tree | 6327cf73bbc15dfa759e73c6196f1e3a47ea416b /tools/perf/scripts/python/export-to-sqlite.py | |
parent | 40e020c129cfc991e8ab4736d2665351ffd1468d (diff) |
vfio/pci: Parallelize device open and release
In commit 61d792562b53 ("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 <[email protected]>
Tested-by: Christian Ehrhardt <[email protected]>
Reviewed-by: Eric Auger <[email protected]>
Reviewed-by: Cornelia Huck <[email protected]>
Signed-off-by: Alex Williamson <[email protected]>
Diffstat (limited to 'tools/perf/scripts/python/export-to-sqlite.py')
0 files changed, 0 insertions, 0 deletions