Search code examples
linuxreal-time

what is RT_PREEMPT? how is it different from preempt rt ?does these mean same real time patch to linux?


I presently working on hardrealtime linux. when i search regarding documentation of topic RT_PREEMPT . different sites turn up with different names like preempt-rt,rt-preempt.

can someone say me the exact link or any resources which could help me look on RT_PREEMPT?


Solution

  • You are looking for the RT_Preempt patch, which is documented here. The patch makes the kernel fully preemptable, and also includes some RT schedulers. It includes a how-to for installing it. If you are familiar with building kernels it should be pretty easy.

    I documented my installation on my Ubuntu machine here.

    It is kinda difficult to find up-to-date information on the patch in part because much of it has become mainline in the last few years (having multiple names doesn't help either). For example, the 3.14 kernel has configuration options for a "low-latency" install.

    Steven Rostedt gave a good overview talk in 2013 at the Embedded Linux Conference, available at linuxgizmos.com and youtube. Slides here (pdf). Around minute 17 he really starts to get into the differences:

    • Interrupts are handled with threads (thus scheduled)
    • Spin locks replaced with mutexes
    • Priority inheritance is extended to the kernel