Re: [RFC PATCH] sysfs: Add /sys/kernel/realtime entry
Sebastian Andrzej Siewior <[email protected]> Thu, 9 Jul 2026 17:22:14 +0200
| Newsgroups | org.kernel.vger.linux-rt-users,dev.linux.lists.driver-core,dev.linux.lists.linux-rt-devel |
|---|---|
| Message-ID | <[email protected]> |
On 2026-07-09 16:46:19 [+0200], Greg Kroah-Hartman wrote: > On Thu, Jul 09, 2026 at 04:31:08PM +0200, Sebastian Andrzej Siewior wrote: > > Hi, > > > > The following patch sat in the RT queue for almost 15years now. I can't > > find its origin on the list. > > All it does is adding /sys/kernel/realtime once PREEMPT_RT is enabled > > and returns 1. > > > > Is this something that is still wanted and considered useful? > > Is this something that can be expressed better by other means? > > > > There was an in person discussion about this and it was suggested to add > > /sys/kernel/realtime as a folder and having individual realtime features > > as files. I don't remember a single feature that would quality for this > > today but who knows. This is all I remember so far. > > > > Now. Discussion go! > > At the very least, it's not ok as it's not documented in > Documentation/ABI/ :) :) > But really, why is this needed? Userspace shouldn't care, right? So there is Clark who needed it 15y ago for some udev rules. Maybe he elaborate on that. There is custom "software" that is designed for realtime environment and if it is run on a regular kernel then it missed its timing requirements and the software goes usually in a fail state and people start debugging what has happen. If this happens often enough (booting a non-RT kernel) they tend to add a check so that the software complains early enough since checking the kernel is usually the last thing that is done. This could work with the file (or folder) or by parsing uname output. I know of at least two individuals that switched to uname because the upstream RT does not have that file. cyclictest (from rt-tests) is using this file but only while collecting system information, nothing else. https://git.kernel.org/pub/scm/utils/rt-tests/rt-tests.git/tree/src/lib/rt-utils.c#n528 There is also sosreport https://github.com/sosreport/sos/blob/main/sos/report/plugins/kernelrt.py#L32 using for information collection purpose. There is thermald https://github.com/intel/thermal_daemon/blob/master/src/thd_engine.cpp#L1065 but this looks like just information gathering. That check looks wrong since there is a space instead of an underline in the check so this was not tested on a RT kernel. > And checkpatch should complain about the sprintf(), should be > sysfs_emit(). Sure. > thanks, > > greg k-h Sebastian