]> www.infradead.org Git - users/jedix/linux-maple.git/commit
x86/itmt: Move the "sched_itmt_enabled" sysctl to debugfs
authorK Prateek Nayak <kprateek.nayak@amd.com>
Mon, 23 Dec 2024 04:34:02 +0000 (04:34 +0000)
committerPeter Zijlstra <peterz@infradead.org>
Mon, 13 Jan 2025 13:10:24 +0000 (14:10 +0100)
commitd04013a4b21bd5a4e10c42f71ed1e5e299cacdfe
tree154480b3d24b82b643a3abe9422597160688d1c1
parentfc1055d5334f1808e3e445592a83f31624b953f1
x86/itmt: Move the "sched_itmt_enabled" sysctl to debugfs

"sched_itmt_enabled" was only introduced as a debug toggle for any funky
ITMT behavior. Move the sysctl controlled from
"/proc/sys/kernel/sched_itmt_enabled" to debugfs at
"/sys/kernel/debug/x86/sched_itmt_enabled" with a notable change that a
cat on the file will return "Y" or "N" instead of "1" or "0" to
indicate that feature is enabled or disabled respectively. Either "0" or
"N" (or any string that kstrtobool() interprets as false) can be written
to the file will disable the feature, and writing  either "1" or "Y" (or
any string that kstrtobool() interprets as true) will enable it back
when the platform supports ITMT ranking.

Since ITMT is x86 specific (and PowerPC uses SD_ASYM_PACKING too), the
toggle was moved to "/sys/kernel/debug/x86/" as opposed to
"/sys/kernel/debug/sched/"

Suggested-by: Peter Zijlstra <peterz@infradead.org>
Signed-off-by: K Prateek Nayak <kprateek.nayak@amd.com>
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Reviewed-by: Tim Chen <tim.c.chen@linux.intel.com>
Link: https://lore.kernel.org/r/20241223043407.1611-4-kprateek.nayak@amd.com
arch/x86/kernel/itmt.c