exposing full preemption in sysfs

From: Chris Murphy
Date: Tue Apr 11 2023 - 15:59:23 EST


Hi,

Is there a future when changing preemption mode at runtime will be exposed in sysfs outside of debugfs?

Currently debugfs is subject to kernel lockdown (at least on Fedora) whenever UEFI Secure Boot is enabled.

# cat /sys/kernel/debug/sched/preempt
[68690.741678] Lockdown: cat: debugfs access is restricted; see man kernel_lockdown.7

So it's not possible to enable full preemption at runtime. Also, adding another kernel parameter isn't popular (takes up limited space, isn't user facing or very friendly to modify bootloader configuration to enable or disable it).

I think it's preferred to see it available in syfs proper, and then something like a systemd unit can modify the value during boot, and users can enable or disable that unit like they do any other kind of service.

Thoughts?


--
Chris Murphy