dri-devel Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: "Timur Kristóf" <timur.kristof@gmail.com>
To: "Michel Dänzer" <michel@daenzer.net>,
	"Mika Westerberg" <mika.westerberg@linux.intel.com>
Cc: "michael.jamet@intel.com" <michael.jamet@intel.com>,
	"dri-devel@lists.freedesktop.org"
	<dri-devel@lists.freedesktop.org>
Subject: Re: Why is Thunderbolt 3 limited to 2.5 GT/s on Linux?
Date: Tue, 02 Jul 2019 11:49:34 +0200	[thread overview]
Message-ID: <f986d6687e2b1f1fc8a93f86cbc8fd1ab971663a.camel@gmail.com> (raw)
In-Reply-To: <792d0f36-b8ae-bef9-3b07-95677637ba00@daenzer.net>

On Tue, 2019-07-02 at 10:09 +0200, Michel Dänzer wrote:
> On 2019-07-01 6:01 p.m., Timur Kristóf wrote:
> > On Mon, 2019-07-01 at 16:54 +0200, Michel Dänzer wrote:
> > > On 2019-06-28 2:21 p.m., Timur Kristóf wrote:
> > > > I haven't found a good way to measure the maximum PCIe
> > > > throughput
> > > > between the CPU and GPU,
> > > 
> > > amdgpu.benchmark=3
> > > 
> > > on the kernel command line will measure throughput for various
> > > transfer
> > > sizes during driver initialization.
> > 
> > Thanks, I will definitely try that.
> > Is this the only way to do this, or is there a way to benchmark it
> > after it already booted?
> 
> The former. At least in theory, it's possible to unload the amdgpu
> module while nothing is using it, then load it again.

Okay, so I booted my system with amdgpu.benchmark=3
You can find the full dmesg log here: https://pastebin.com/zN9FYGw4

The result is between 1-5 Gbit / sec depending on the transfer size
(the higher the better), which corresponds to neither the 8 Gbit / sec
that the kernel thinks it is limited to, nor the 20 Gbit / sec which I
measured earlier with pcie_bw. Since pcie_bw only shows the maximum
PCIe packet size (and not the actual size), could it be that it's so
inaccurate that the 20 Gbit / sec is a fluke?

Side note: after booting with amdgpu.benchmark=3 the graphical session
was useless and straight out hanged the system after I logged in. So I
had to reboot into runlevel 3 to be able to save the above dmesg log.

> 
> > > > but I did take a look at AMD's sysfs interface at
> > > > /sys/class/drm/card1/device/pcie_bw which while running the
> > > > bottlenecked
> > > > game. The highest throughput I saw there was only 2.43 Gbit
> > > > /sec.
> > > 
> > > PCIe bandwidth generally isn't a bottleneck for games, since they
> > > don't
> > > constantly transfer large data volumes across PCIe, but store
> > > them in
> > > the GPU's local VRAM, which is connected at much higher
> > > bandwidth.
> > 
> > There are reasons why I think the problem is the bandwidth:
> > 1. The same issues don't happen when the GPU is not used with a TB3
> > enclosure.
> > 2. In case of radeonsi, the problem was mitigated once Marek's SDMA
> > patch was merged, which hugely reduces the PCIe bandwidth use.
> > 3. In less optimized cases (for example D9VK), the problem is still
> > very noticable.
> 
> However, since you saw as much as ~20 Gbit/s under different
> circumstances, the 2.43 Gbit/s used by this game clearly isn't a hard
> limit; there must be other limiting factors.

There may be other factors, yes. I can't offer a good explanation on
what exactly is happening, but it's pretty clear that amdgpu can't take
full advantage of the TB3 link, so it seemed like a good idea to start
investigating this first.

_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

  reply	other threads:[~2019-07-02  9:49 UTC|newest]

Thread overview: 34+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-06-28 10:23 Why is Thunderbolt 3 limited to 2.5 GT/s on Linux? Timur Kristóf
2019-06-28 10:32 ` Mika Westerberg
2019-06-28 11:08   ` Timur Kristóf
2019-06-28 11:34     ` Mika Westerberg
2019-06-28 12:21       ` Timur Kristóf
2019-06-28 12:53         ` Mika Westerberg
2019-06-28 13:33           ` Timur Kristóf
2019-06-28 14:14             ` Mika Westerberg
2019-06-28 14:53               ` Timur Kristóf
2019-07-01 11:44                 ` Mika Westerberg
2019-07-01 14:25                   ` Timur Kristóf
2019-07-01 14:28         ` Alex Deucher
2019-07-01 14:38           ` Timur Kristóf
2019-07-01 14:46             ` Alex Deucher
2019-07-01 15:10               ` Mika Westerberg
2019-07-01 14:54         ` Michel Dänzer
2019-07-01 16:01           ` Timur Kristóf
2019-07-02  8:09             ` Michel Dänzer
2019-07-02  9:49               ` Timur Kristóf [this message]
2019-07-03  8:07                 ` Michel Dänzer
2019-07-03 11:04                   ` Timur Kristóf
2019-07-04  8:26                     ` Michel Dänzer
2019-07-05  9:17                       ` Timur Kristóf
2019-07-05 13:36                       ` Alex Deucher
2019-07-18  9:11                         ` Timur Kristóf
2019-07-18 13:50                           ` Alex Deucher
     [not found]                             ` <172a41d97d383a8989ebd213bb4230a2df4d636d.camel@gmail.com>
2019-07-19 14:29                               ` Alex Deucher
2019-07-03 18:44                   ` Marek Olšák
2019-07-05  9:27                     ` Timur Kristóf
2019-07-05 15:35                       ` Marek Olšák
2019-07-05 16:01                         ` Timur Kristóf
     [not found]                         ` <8f0c2d7780430d40dd1e17a82484d236eae3f981.camel@gmail.com>
2019-07-18 10:29                           ` Michel Dänzer
2019-07-22  9:39                             ` Timur Kristóf
2019-07-23  8:11                               ` Michel Dänzer

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=f986d6687e2b1f1fc8a93f86cbc8fd1ab971663a.camel@gmail.com \
    --to=timur.kristof@gmail.com \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=michael.jamet@intel.com \
    --cc=michel@daenzer.net \
    --cc=mika.westerberg@linux.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox