On 2025-06-19 07:19:23 [-0400], Michael Schanne wrote: > > So you are not using clock_nanosleep() but something like a POSIX timer? > > No, I was using timerfd_create() and then calling read() in a loop in > my timer thread. Is it recommended to use clock_nanosleep() instead? clock_nanosleep() based delays allow a "direct" wakeup. So yes. Because of how it is implemented, timerfd based wakeup need to be performed by a thread which is ktimersd. If you busy-poll the timer from your application then ktimersd needs to have a higher priority than your application so that it can preempt it. ktimersd is also responsible the wakeups of non-RT applications. So if multiple SCHED_OTHER applications ask for a wakeup then this wake up will preempt your realtime task. > -Mike Sebastian