diff options
author | Dmitry Torokhov <[email protected]> | 2023-07-14 15:45:33 -0700 |
---|---|---|
committer | Alex Williamson <[email protected]> | 2023-08-03 12:01:56 -0600 |
commit | 73e2f19da50857a3488f44a7c9d874fed6fae533 (patch) | |
tree | 1fada3117e1a97eabf0eef97d35ab43b962fae8a /tools/testing/selftests/bpf/progs/test_autoload.c | |
parent | 9e0f4f2918c2ff145d3dedee862d9919a6ed5812 (diff) |
kvm/vfio: avoid bouncing the mutex when adding and deleting groups
Stop taking kv->lock mutex in kvm_vfio_update_coherency() and instead
call it with this mutex held: the callers of the function usually
already have it taken (and released) before calling
kvm_vfio_update_coherency(). This avoid bouncing the lock up and down.
The exception is kvm_vfio_release() where we do not take the lock, but
it is being executed when the very last reference to kvm_device is being
dropped, so there are no concerns about concurrency.
Suggested-by: Alex Williamson <[email protected]>
Reviewed-by: Alex Williamson <[email protected]>
Signed-off-by: Dmitry Torokhov <[email protected]>
Reviewed-by: Kevin Tian <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Alex Williamson <[email protected]>
Diffstat (limited to 'tools/testing/selftests/bpf/progs/test_autoload.c')
0 files changed, 0 insertions, 0 deletions