mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Wei Liu <wei.liu@kernel.org>
To: Sahil Chandna <sahilchandna@linux.microsoft.com>
Cc: "Naman Jain" <namjain@linux.microsoft.com>,
	"K. Y. Srinivasan" <kys@microsoft.com>,
	"Haiyang Zhang" <haiyangz@microsoft.com>,
	"Wei Liu" <wei.liu@kernel.org>,
	"Dexuan Cui" <decui@microsoft.com>,
	"Long Li" <longli@microsoft.com>,
	"Lorenzo Pieralisi" <lpieralisi@kernel.org>,
	"Krzysztof Wilczyński" <kwilczynski@kernel.org>,
	"Manivannan Sadhasivam" <mani@kernel.org>,
	"Rob Herring" <robh@kernel.org>,
	"Bjorn Helgaas" <bhelgaas@google.com>,
	linux-hyperv@vger.kernel.org, linux-pci@vger.kernel.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH] PCI: hv: Probe vPCI buses asynchronously
Date: Sat, 19 Sep 2026 16:09:12 -0700	[thread overview]
Message-ID: <20260919230912.GD1008213@liuwe-devbox-debian-v2.local> (raw)
In-Reply-To: <011f1fa5-89c5-4bc5-8b2e-c5f415a57559@linux.microsoft.com>

On Thu, Sep 17, 2026 at 11:01:03AM +0530, Sahil Chandna wrote:
> On 07-09-2026 11:17, Naman Jain wrote:
> > On Hyper-V guests each virtual PCI bus is enumerated by its own
> > hv_pci_probe() call. The probe performs several synchronous host
> > request/response exchanges while negotiating the protocol, querying bus
> > relations, entering D0, and reporting allocated resources. These waits
> > are latency-bound rather than CPU-bound.
> > 
> > hv_pci registers as an ordinary VMBus driver, so driver_register() walks
> > matching vPCI buses and probes them sequentially while the driver's
> > initcall runs. On guests that expose several devices, each through its
> > own vPCI bus, this serialization adds the host round-trip latencies to
> > device initialization.
> > 
> > Each bus is described by its own struct hv_pcibus_device, so
> > independent buses can be probed concurrently. Request asynchronous
> > probing via PROBE_PREFER_ASYNCHRONOUS, causing the driver core to
> > schedule matching buses for asynchronous probe work.
> > 
> > On an Azure Standard_L32s_v3 guest with five vPCI targets (four NVMe
> > controllers and one Mellanox VF), Linux 7.2.3 was tested with one warm-up
> > and three measured boots per variant. The median interval from the first
> > hv_pci_probe() entry to the last return decreased from 2847.968 ms to
> > 2786.709 ms, a 61.259 ms (2.15%) improvement.
> > 
> > Co-developed-by: Dexuan Cui <decui@microsoft.com>
> > Signed-off-by: Dexuan Cui <decui@microsoft.com>
> > Signed-off-by: Naman Jain <namjain@linux.microsoft.com>
> > ---
> > 
> > Previous discussion around this change:
> > https://lore.kernel.org/all/20230420024037.5921-7-decui@microsoft.com/
> > 
> > Skipping removal of pci_rescan_remove_lock, due to possible
> > synchronization problems associated with this lock removal. Also, with
> > my current setup, I was not able to see much improvements with this
> > change, so keeping it for later. Asynchronous probing change is not
> > dependent on this.
> > 
> > ---
> >  drivers/pci/controller/pci-hyperv.c | 3 +++
> >  1 file changed, 3 insertions(+)
> > 
> > diff --git a/drivers/pci/controller/pci-hyperv.c b/drivers/pci/controller/pci-hyperv.c
> > index 89816a2bd7cd3..056d379b3cee4 100644
> > --- a/drivers/pci/controller/pci-hyperv.c
> > +++ b/drivers/pci/controller/pci-hyperv.c
> > @@ -4155,6 +4155,9 @@ static struct hv_driver hv_pci_drv = {
> >  	.remove		= hv_pci_remove,
> >  	.suspend	= hv_pci_suspend,
> >  	.resume		= hv_pci_resume,
> > +	.driver = {
> > +		.probe_type = PROBE_PREFER_ASYNCHRONOUS,
> > +	},
> >  };
> >  
> >  static void __exit exit_hv_pci_drv(void)
> LGTM.
> Reviewed-by: Sahil Chandna <sahilchandna@linux.microsoft.com>

Applied. Thanks.

      reply	other threads:[~2026-09-19 23:09 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-09-07  5:47 Naman Jain
2026-09-17  5:31 ` Sahil Chandna
2026-09-19 23:09   ` Wei Liu [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=20260919230912.GD1008213@liuwe-devbox-debian-v2.local \
    --to=wei.liu@kernel.org \
    --cc=bhelgaas@google.com \
    --cc=decui@microsoft.com \
    --cc=haiyangz@microsoft.com \
    --cc=kwilczynski@kernel.org \
    --cc=kys@microsoft.com \
    --cc=linux-hyperv@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pci@vger.kernel.org \
    --cc=longli@microsoft.com \
    --cc=lpieralisi@kernel.org \
    --cc=mani@kernel.org \
    --cc=namjain@linux.microsoft.com \
    --cc=robh@kernel.org \
    --cc=sahilchandna@linux.microsoft.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

all inboxes | Powered by JetHome®