From: Yi Liu <yi.l.liu@intel.com>
To: Alex Williamson <alex.williamson@redhat.com>, <kvm@vger.kernel.org>
Cc: <aaronlewis@google.com>, <jgg@nvidia.com>, <bhelgaas@google.com>,
<dmatlack@google.com>, <vipinsh@google.com>, <seanjc@google.com>,
<jrhilke@google.com>, <kevin.tian@intel.com>
Subject: Re: [PATCH] vfio/pci: Separate SR-IOV VF dev_set
Date: Mon, 30 Jun 2025 21:15:58 +0800 [thread overview]
Message-ID: <005c3ac7-dfa1-423e-a095-01b5df535b9c@intel.com> (raw)
In-Reply-To: <20250626225623.1180952-1-alex.williamson@redhat.com>
On 2025/6/27 06:56, Alex Williamson wrote:
> In the below noted Fixes commit we introduced a reflck mutex to allow
> better scaling between devices for open and close. The reflck was
> based on the hot reset granularity, device level for root bus devices
> which cannot support hot reset or bus/slot reset otherwise. Overlooked
> in this were SR-IOV VFs, where there's also no bus reset option, but
> the default for a non-root-bus, non-slot-based device is bus level
> reflck granularity.
>
> The reflck mutex has since become the dev_set mutex and is our defacto
> serialization for various operations and ioctls. It still seems to be
> the case though that sets of vfio-pci devices really only need
a nit: not sure if mentioning 2cd8b14aaa66 which convers reflck to dev_set
mutex is helpful. Perhaps, it's welcomed by people working on backporting. :)
> serialization relative to hot resets affecting the entire set, which
> is not relevant to SR-IOV VFs. As described in the Closes link below,
> this serialization contributes to startup latency when multiple VFs
> sharing the same "bus" are opened concurrently.
>
> Mark the device itself as the basis of the dev_set for SR-IOV VFs.
>
> Reported-by: Aaron Lewis <aaronlewis@google.com>
> Closes: https://lore.kernel.org/all/20250626180424.632628-1-aaronlewis@google.com
> Tested-by: Aaron Lewis <aaronlewis@google.com>
> Fixes: e309df5b0c9e ("vfio/pci: Parallelize device open and release")
> Signed-off-by: Alex Williamson <alex.williamson@redhat.com>
> ---
> drivers/vfio/pci/vfio_pci_core.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
Reviewed-by: Yi Liu <yi.l.liu@intel.com>
Regards,
Yi Liu
next prev parent reply other threads:[~2025-06-30 13:09 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-06-26 22:56 [PATCH] vfio/pci: Separate SR-IOV VF dev_set Alex Williamson
2025-06-30 6:32 ` Tian, Kevin
2025-06-30 13:15 ` Yi Liu [this message]
2025-06-30 14:57 ` Alex Williamson
2025-07-02 16:00 ` Jason Gunthorpe
2025-07-02 17:50 ` Alex Williamson
2025-07-02 17:55 ` Jason Gunthorpe
2025-07-03 6:10 ` Tian, Kevin
2025-07-03 13:23 ` Jason Gunthorpe
2025-07-03 20:29 ` Alex Williamson
2025-07-03 23:35 ` Jason Gunthorpe
2025-07-15 18:42 ` Alex Williamson
2025-07-15 18:53 ` Jason Gunthorpe
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=005c3ac7-dfa1-423e-a095-01b5df535b9c@intel.com \
--to=yi.l.liu@intel.com \
--cc=aaronlewis@google.com \
--cc=alex.williamson@redhat.com \
--cc=bhelgaas@google.com \
--cc=dmatlack@google.com \
--cc=jgg@nvidia.com \
--cc=jrhilke@google.com \
--cc=kevin.tian@intel.com \
--cc=kvm@vger.kernel.org \
--cc=seanjc@google.com \
--cc=vipinsh@google.com \
/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).