2023-04-11 20:03:19

by Chris Murphy

[permalink] [raw]
Subject: exposing full preemption in sysfs

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