I have a kernel thread which is assigned on a specific CPU with FIFO and highest priority. This thread sleeps from time to time but the time interval must be as precise as possi
I've used combination of hrtimer and waitqueue to implement periodical task using kernel thread:
wait_event()/wait_event_timeout()
wake_up()/wake_up_all()
Also, just found, you can implement sleep using hrtimer_init_sleeper()
and schedule()
, see __wait_event_hrtimeout() or do_nanosleep(). But I nether tried that.