From: bugzilla-daemon@kernel.org
To: dri-devel@lists.freedesktop.org
Subject: [Bug 219611] New: Read of pcie_bw sysfs file on AMD GPU blocks for 1 second
Date: Wed, 18 Dec 2024 14:49:58 +0000 [thread overview]
Message-ID: <bug-219611-2300@https.bugzilla.kernel.org/> (raw)
https://bugzilla.kernel.org/show_bug.cgi?id=219611
Bug ID: 219611
Summary: Read of pcie_bw sysfs file on AMD GPU blocks for 1
second
Product: Drivers
Version: 2.5
Hardware: Intel
OS: Linux
Status: NEW
Severity: normal
Priority: P3
Component: Video(DRI - non Intel)
Assignee: drivers_video-dri@kernel-bugs.osdl.org
Reporter: yumpusamongus+kernelbugzilla@gmail.com
Regression: No
Multiple cases of userspace resource monitors getting tripped up by this:
https://github.com/Syllo/nvtop/issues/139
https://github.com/Syllo/nvtop/issues/208
https://github.com/aristocratos/btop/issues/793
https://gitlab.com/mission-center-devs/mission-center/-/issues/309
The behavior is highly unusual and would require special treatment of just that
file in userspace.
The docs say "The amdgpu driver provides a sysfs API for estimating how much
data has been received and sent by the GPU in the last second through PCIe".
Specifically, the LAST second, not the second starting when read() was called.
The culprit, as far as I can tell, is the msleep here:
https://elixir.bootlin.com/linux/v6.12.4/source/drivers/gpu/drm/amd/amdgpu/soc15.c#L756
(the same code is copy-pasted in 4 places).
I am not familiar with the intricacies of AMD GPUs, but what would be the cost
to having those counters enabled all the time, and reporting the number of
messages in some recent second? Or even better, ripping this out and exposing
the integrating message counts directly, so userspace can choose whichever
sample rate it wants?
--
You may reply to this email to add a comment.
You are receiving this mail because:
You are watching the assignee of the bug.
next reply other threads:[~2024-12-18 14:50 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-12-18 14:49 bugzilla-daemon [this message]
2024-12-18 18:55 ` [Bug 219611] Read of pcie_bw sysfs file on AMD GPU blocks for 1 second bugzilla-daemon
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=bug-219611-2300@https.bugzilla.kernel.org/ \
--to=bugzilla-daemon@kernel.org \
--cc=dri-devel@lists.freedesktop.org \
/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.