mbox series

[0/2] Simplify some of the locking in vfio_group

Message ID 0-v1-917e3647f123+b1a-vfio_group_users_jgg@nvidia.com (mailing list archive)
Headers show
Series Simplify some of the locking in vfio_group | expand

Message

Jason Gunthorpe Sept. 29, 2022, 2:59 p.m. UTC
Kevin points out that the vfio_group->users doesn't really need to exist
now, and some other inspection shows that the group_rwsem has outlived its
utility as well. Replace both with simpler constructs.

Signed-off-by: Jason Gunthorpe <jgg@nvidia.com>

Jason Gunthorpe (2):
  vfio: Remove the vfio_group->users and users_comp
  vfio: Change vfio_group->group_rwsem to a mutex

 drivers/vfio/container.c | 10 ++---
 drivers/vfio/vfio.h      |  5 +--
 drivers/vfio/vfio_main.c | 92 +++++++++++++++++++---------------------
 3 files changed, 50 insertions(+), 57 deletions(-)


base-commit: 42e1d1eed20a17c6cbb1d600c77a6ca69a632d4c

Comments

Alex Williamson Sept. 30, 2022, 9:31 p.m. UTC | #1
On Thu, 29 Sep 2022 11:59:23 -0300
Jason Gunthorpe <jgg@nvidia.com> wrote:

> Kevin points out that the vfio_group->users doesn't really need to exist
> now, and some other inspection shows that the group_rwsem has outlived its
> utility as well. Replace both with simpler constructs.
> 
> Signed-off-by: Jason Gunthorpe <jgg@nvidia.com>
> 
> Jason Gunthorpe (2):
>   vfio: Remove the vfio_group->users and users_comp
>   vfio: Change vfio_group->group_rwsem to a mutex
> 
>  drivers/vfio/container.c | 10 ++---
>  drivers/vfio/vfio.h      |  5 +--
>  drivers/vfio/vfio_main.c | 92 +++++++++++++++++++---------------------
>  3 files changed, 50 insertions(+), 57 deletions(-)
> 
> 
> base-commit: 42e1d1eed20a17c6cbb1d600c77a6ca69a632d4c

Applied to vfio next branch for v6.1.  Thanks,

Alex