virtualization.lists.linux-foundation.org archive mirror
 help / color / mirror / Atom feed
From: Si-Wei Liu <si-wei.liu@oracle.com>
To: Eli Cohen <elic@nvidia.com>, mst@redhat.com, jasowang@redhat.com
Cc: linux-kernel@vger.kernel.org, virtualization@lists.linux-foundation.org
Subject: Re: [PATCH v5 3/3] vdpa/mlx5: Add support for reading descriptor statistics
Date: Thu, 12 May 2022 14:15:27 -0700	[thread overview]
Message-ID: <5d93dfcd-22cb-8e5a-1dcb-c6de6772b789@oracle.com> (raw)
In-Reply-To: <eda33c78-fd39-a5bb-9e9e-06b2c37d3fe5@oracle.com>


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?

-Siwei
_______________________________________________
Virtualization mailing list
Virtualization@lists.linux-foundation.org
https://lists.linuxfoundation.org/mailman/listinfo/virtualization

  parent reply	other threads:[~2022-05-12 21:15 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20220510112734.205669-1-elic@nvidia.com>
     [not found] ` <20220510112734.205669-2-elic@nvidia.com>
2022-05-10 16:18   ` [PATCH v5 1/3] vdpa: Fix error logic in vdpa_nl_cmd_dev_get_doit Si-Wei Liu
     [not found] ` <20220510112734.205669-4-elic@nvidia.com>
2022-05-11 17:25   ` [PATCH v5 3/3] vdpa/mlx5: Add support for reading descriptor statistics Si-Wei Liu
2022-05-12  2:27     ` Jason Wang
2022-05-13  1:10       ` Si-Wei Liu
2022-05-12 21:13     ` Si-Wei Liu
2022-05-12 21:15     ` Si-Wei Liu [this message]
2022-05-12 21:16     ` Si-Wei Liu
     [not found] ` <20220510112734.205669-3-elic@nvidia.com>
2022-05-11 18:15   ` [PATCH v5 2/3] vdpa: Add support for querying vendor statistics Si-Wei Liu

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=5d93dfcd-22cb-8e5a-1dcb-c6de6772b789@oracle.com \
    --to=si-wei.liu@oracle.com \
    --cc=elic@nvidia.com \
    --cc=jasowang@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mst@redhat.com \
    --cc=virtualization@lists.linux-foundation.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).