Linux PCI subsystem development
 help / color / mirror / Atom feed
From: sashiko-bot@kernel.org
To: "Ionut Nechita (Wind River)" <ionut.nechita@windriver.com>
Cc: linux-pci@vger.kernel.org
Subject: Re: [PATCH] PCI/IOV: Don't make sriov_numvfs reads wait while VFs are enabled
Date: Fri, 20 Nov 2026 08:08:55 +0000	[thread overview]
Message-ID: <sashiko-outbox-224682@kernel.org> (raw)
In-Reply-To: <20261120080143.56701-1-ionut.nechita@windriver.com>

> From: Ionut Nechita <ionut.nechita@windriver.com>
> 
> Since commit 35ff867b7657 ("PCI/IOV: Serialize sysfs sriov_numvfs
> reads vs writes"), sriov_numvfs_show() takes the device lock so that a
> read does not return a stale num_VFs while sriov_numvfs_store() is
> enabling VFs and they are becoming visible. The store holds the device
> lock for the whole SR-IOV change, and disabling SR-IOV can hold it for
> a very long time: with vfio-pci, sriov_disable() waits for the VF
> driver unbind, which waits for the userspace driver to release the VF.
> 
>   sriov_numvfs_store                       sriov_numvfs_show
>     device_lock(PF)                          device_lock(PF)  <-- waits
>     vfio_pci_core_sriov_configure
>       sriov_disable
>         pci_iov_remove_virtfn
> [ ... ]
> device lock while num_VFs is 0, can still be long. Make it
> interruptible, so that a reader can at least be killed.
> 
> Fixes: 35ff867b7657 ("PCI/IOV: Serialize sysfs sriov_numvfs reads vs writes")
> Signed-off-by: Ionut Nechita <ionut.nechita@windriver.com>

Sashiko has reviewed this patch and found no issues.

-- 
Sashiko AI review · https://sashiko.dev/#/patchset/20261120080143.56701-1-ionut.nechita@windriver.com?part=1


      reply	other threads:[~2026-11-20  8:08 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-20  8:01 [PATCH] PCI/IOV: Don't make sriov_numvfs reads wait while VFs are enabled Ionut Nechita (Wind River)
2026-11-20  8:08 ` sashiko-bot [this message]

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=sashiko-outbox-224682@kernel.org \
    --to=sashiko-bot@kernel.org \
    --cc=ionut.nechita@windriver.com \
    --cc=linux-pci@vger.kernel.org \
    --cc=sashiko-reviews@lists.linux.dev \
    /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