From: Jim Cromie <jim.cromie@gmail.com>
To: linux-kernel@vger.kernel.org, akpm@linuxfoundation.org
Cc: Jim Cromie <jim.cromie@gmail.com>
Subject: [PATCH] drm/print: Mark __drm_debug as __read_mostly
Date: Fri, 25 Sep 2026 14:46:17 -0600 [thread overview]
Message-ID: <20260925204617.69199-1-jim.cromie@gmail.com> (raw)
Under multi-client workloads (e.g. 12 concurrent vkcubes on AMD iGPU),
__drm_debug is read at ~83.3 kHz across multiple cores during atomic and
vblank checks, but is otherwise write-rare.
Without section placement attributes, the linker packs __drm_debug into
.bss adjacent to hot structures like drm_lease_idr_object, drm_class,
and drm_global_mutex, causing unnecessary cacheline invalidations.
Mark __drm_debug as __read_mostly to relocate it to .data..read_mostly.
Signed-off-by: Jim Cromie <jim.cromie@gmail.com>
---
drivers/gpu/drm/drm_print.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/gpu/drm/drm_print.c b/drivers/gpu/drm/drm_print.c
index 86cef1a37678..50cdeb1b15e2 100644
--- a/drivers/gpu/drm/drm_print.c
+++ b/drivers/gpu/drm/drm_print.c
@@ -40,7 +40,7 @@
* __drm_debug: Enable debug output.
* Bitmask of DRM_UT_x. See include/drm/drm_print.h for details.
*/
-unsigned long __drm_debug;
+unsigned long __drm_debug __read_mostly;
EXPORT_SYMBOL(__drm_debug);
MODULE_PARM_DESC(debug, "Enable debug output, where each bit enables a debug category.\n"
--
2.55.0
reply other threads:[~2026-09-25 20:46 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=20260925204617.69199-1-jim.cromie@gmail.com \
--to=jim.cromie@gmail.com \
--cc=akpm@linuxfoundation.org \
--cc=linux-kernel@vger.kernel.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 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®