diff options
author | Tal Gilboa <talgi@mellanox.com> | 2018-03-30 16:37:44 +0300 |
---|---|---|
committer | Bjorn Helgaas <helgaas@kernel.org> | 2018-04-03 16:58:29 +0300 |
commit | 6db79a88c67e4679d9c1e4a3f05c6385e21f6e9a (patch) | |
tree | 0a382af9924ea5146d648539fb4ea993c940e499 /tools/perf/scripts/python/call-graph-from-sql.py | |
parent | b852f63aa6cee3f4846383377c414ae9c4fbc166 (diff) | |
download | linux-6db79a88c67e4679d9c1e4a3f05c6385e21f6e9a.tar.xz |
PCI: Add pcie_bandwidth_available() to compute bandwidth available to device
Add pcie_bandwidth_available() to compute the bandwidth available to a
device. This may be limited by the device itself or by a slower upstream
link leading to the device.
The available bandwidth at each link along the path is computed as:
link_width * link_speed * (1 - encoding_overhead)
2.5 and 5.0 GT/s links use 8b/10b encoding, which reduces the raw bandwidth
available by 20%; 8.0 GT/s and faster links use 128b/130b encoding, which
reduces it by about 1.5%.
The result is in Mb/s, i.e., megabits/second, of raw bandwidth.
Also return the device with the slowest link and the speed and width of
that link.
Signed-off-by: Tal Gilboa <talgi@mellanox.com>
[bhelgaas: changelog, leave pcie_get_minimum_link() alone for now, return
bw directly, use pci_upstream_bridge(), check "next_bw <= bw" to find
uppermost limiting device, return speed/width of the limiting device]
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
Diffstat (limited to 'tools/perf/scripts/python/call-graph-from-sql.py')
0 files changed, 0 insertions, 0 deletions