All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Daniel P. Berrangé" <berrange@redhat.com>
To: "Gao,Shiyuan" <gaoshiyuan@baidu.com>
Cc: "eduardo@habkost.net" <eduardo@habkost.net>,
	"marcel.apfelbaum@gmail.com" <marcel.apfelbaum@gmail.com>,
	"mst@redhat.com" <mst@redhat.com>,
	"zhao1.liu@intel.com" <zhao1.liu@intel.com>,
	"alex.williamson@redhat.com" <alex.williamson@redhat.com>,
	"qemu-devel@nongnu.org" <qemu-devel@nongnu.org>
Subject: Re: [PATCH 1/1] pcie-root-port: Fast PCIe root ports for new machine
Date: Tue, 3 Dec 2024 11:08:25 +0000	[thread overview]
Message-ID: <Z07mqQsWJ299QmAs@redhat.com> (raw)
In-Reply-To: <BB513C15-DFE1-40B0-91B6-914D70D3EFB2@baidu.com>

On Tue, Dec 03, 2024 at 10:58:22AM +0000, Gao,Shiyuan via wrote:
> > Some hardware devices now support PCIe 5.0, so change the default
> > speed of the PCIe root port on new machine types.
> >
> > For passthrough Nvidia H20, this will be able to increase the h2d/d2h
> > bandwidth ~17%.
> >
> > Origin:
> > [CUDA Bandwidth Test] - Starting...
> > Running on...
> >
> > Device 0: NVIDIA H20
> > Quick Mode
> >
> > Host to Device Bandwidth, 1 Device(s)
> > PINNED Memory Transfers
> >    Transfer Size (Bytes)    Bandwidth(MB/s)
> >    33554432            45915.4
> >
> > Device to Host Bandwidth, 1 Device(s)
> > PINNED Memory Transfers
> >    Transfer Size (Bytes)    Bandwidth(MB/s)
> >    33554432            45980.3
> >
> > Device to Device Bandwidth, 1 Device(s)
> > PINNED Memory Transfers
> >    Transfer Size (Bytes)    Bandwidth(MB/s)
> >    33554432            1842886.8
> >
> > Result = PASS
> >
> > With this patch:
> > [CUDA Bandwidth Test] - Starting...
> > Running on...
> >
> > Device 0: NVIDIA H20
> > Quick Mode
> >
> > Host to Device Bandwidth, 1 Device(s)
> > PINNED Memory Transfers
> >    Transfer Size (Bytes)	Bandwidth(MB/s)
> >    33554432			53682.0
> >
> > Device to Host Bandwidth, 1 Device(s)
> > PINNED Memory Transfers
> >    Transfer Size (Bytes)	Bandwidth(MB/s)
> >    33554432			53766.0
> >
> > Device to Device Bandwidth, 1 Device(s)
> > PINNED Memory Transfers
> >    Transfer Size (Bytes)	Bandwidth(MB/s)
> >    33554432			1842555.1
> >
> > Result = PASS
> >
> > Signed-off-by: Gao Shiyuan <gaoshiyuan@baidu.com>
> > ---
> > hw/core/machine.c                  | 1 +
> > hw/pci-bridge/gen_pcie_root_port.c | 2 +-
> > 2 files changed, 2 insertions(+), 1 deletion(-)
> >
> > diff --git a/hw/core/machine.c b/hw/core/machine.c
> > index a35c4a8fae..afef55626d 100644
> > --- a/hw/core/machine.c
> > +++ b/hw/core/machine.c
> > @@ -38,6 +38,7 @@
> >
> > GlobalProperty hw_compat_9_1[] = {
> >      { TYPE_PCI_DEVICE, "x-pcie-ext-tag", "false" },
> > +    { "pcie-root-port", "x-speed", "16" },
> > };
> > const size_t hw_compat_9_1_len = G_N_ELEMENTS(hw_compat_9_1);
> >
> > diff --git a/hw/pci-bridge/gen_pcie_root_port.c b/hw/pci-bridge/gen_pcie_root_port.c
> > index 784507c826..c24ce1f2d1 100644
> > --- a/hw/pci-bridge/gen_pcie_root_port.c
> > +++ b/hw/pci-bridge/gen_pcie_root_port.c
> > @@ -142,7 +142,7 @@ static Property gen_rp_props[] = {
> >      DEFINE_PROP_SIZE("pref64-reserve", GenPCIERootPort,
> >                       res_reserve.mem_pref_64, -1),
> >      DEFINE_PROP_PCIE_LINK_SPEED("x-speed", PCIESlot,
> > -                                speed, PCIE_LINK_SPEED_16),
> > +                                speed, PCIE_LINK_SPEED_32),
> >      DEFINE_PROP_PCIE_LINK_WIDTH("x-width", PCIESlot,
> >                                  width, PCIE_LINK_WIDTH_32),
> >      DEFINE_PROP_END_OF_LIST()
> > --
> > 2.34.1
> 
> Ping.

There was a question from Jonathan Cameron on the original posting of this
patch that is awaiting your answer....

Regardless, at this time in the release cycle its too late for 9.2, so this
patch would likely need to be adapted for the 10.0 release and to use the
hw_compat_9_2 that will then be added.

With regards,
Daniel
-- 
|: https://berrange.com      -o-    https://www.flickr.com/photos/dberrange :|
|: https://libvirt.org         -o-            https://fstop138.berrange.com :|
|: https://entangle-photo.org    -o-    https://www.instagram.com/dberrange :|



  reply	other threads:[~2024-12-03 11:08 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-12-03 10:58 [PATCH 1/1] pcie-root-port: Fast PCIe root ports for new machine Gao,Shiyuan via
2024-12-03 11:08 ` Daniel P. Berrangé [this message]
  -- strict thread matches above, loose matches on Subject: below --
2024-12-03 12:20 Gao,Shiyuan via
2024-12-03 12:15 Gao,Shiyuan via
2024-11-17 14:39 Gao Shiyuan via
2024-11-18 11:43 ` Jonathan Cameron via

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=Z07mqQsWJ299QmAs@redhat.com \
    --to=berrange@redhat.com \
    --cc=alex.williamson@redhat.com \
    --cc=eduardo@habkost.net \
    --cc=gaoshiyuan@baidu.com \
    --cc=marcel.apfelbaum@gmail.com \
    --cc=mst@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --cc=zhao1.liu@intel.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.