[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <DM8PR12MB5400CAAFEB2758FA313E9DF5ABCF9@DM8PR12MB5400.namprd12.prod.outlook.com>
Date: Mon, 16 May 2022 06:05:47 +0000
From: Eli Cohen <elic@...dia.com>
To: Si-Wei Liu <si-wei.liu@...cle.com>,
"mst@...hat.com" <mst@...hat.com>,
"jasowang@...hat.com" <jasowang@...hat.com>
CC: "virtualization@...ts.linux-foundation.org"
<virtualization@...ts.linux-foundation.org>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: RE: [PATCH v5 3/3] vdpa/mlx5: Add support for reading descriptor
statistics
> From: Si-Wei Liu <si-wei.liu@...cle.com>
> Sent: Friday, May 13, 2022 12:15 AM
> To: Eli Cohen <elic@...dia.com>; mst@...hat.com; jasowang@...hat.com
> Cc: virtualization@...ts.linux-foundation.org; linux-kernel@...r.kernel.org
> Subject: Re: [PATCH v5 3/3] vdpa/mlx5: Add support for reading descriptor statistics
>
>
> On 5/11/2022 10:25 AM, Si-Wei Liu wrote:
> >>
> >> +
> >> +static int mlx5_vdpa_get_vendor_vq_stats(struct vdpa_device *vdev,
> >> u16 idx,
> >> + struct sk_buff *msg,
> >> + struct netlink_ext_ack *extack)
> >> +{
> >> + struct mlx5_vdpa_dev *mvdev = to_mvdev(vdev);
> >> + struct mlx5_vdpa_net *ndev = to_mlx5_vdpa_ndev(mvdev);
> >> + struct mlx5_vdpa_virtqueue *mvq;
> >> + struct mlx5_control_vq *cvq;
> >> + u64 received_desc;
> >> + u64 completed_desc;
> >> + int err = 0;
> >> + u16 max_vqp;
> >> +
> >> + mutex_lock(&ndev->reslock);
> > I wonder if we can change this lock to r/w semaphore too, otherwise it
> > almost defeats the merit of converting vdpa_dev_mutex to the same.
> > This change would benefit multiple parallel readers.
> It looks like the lately posted v6 series missed this change somehow?
Yes, I missed that. I will add it as an additional patch.
>
> -Siwei
Powered by blists - more mailing lists