LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Kernel (http://www.linuxquestions.org/questions/linux-kernel-70/)
-   -   Disadvantages of preempt_rt (http://www.linuxquestions.org/questions/linux-kernel-70/disadvantages-of-preempt_rt-938463/)

TheIndependentAquarius 04-06-2012 06:13 AM

Disadvantages of preempt_rt
 
Quote:

the target hardware platform has limited horsepower, and/or you want the real-time job to put the smallest possible overhead on your system. This is where dual kernels are usually better than a native preemption system.
From here: http://www.xenomai.org/index.php/Xen...#Xenomai_3_FAQ

Preempt_rt does preempt the whole Linux. In what way does preempting Linux put load on the system?

The FAQ there talks about the preempt_rt as compared to Xenomai.

macemoneta 04-07-2012 12:50 AM

People have the mistaken belief that RT means faster. In fact, the opposite is true. RT simply means that responses are within a designated timeframe, and have a low jitter (variance in service time). Accomplishing that comes at the cost of throughput because work has to be stopped to meet the required timeframe; an RT system accomplishes less productive work than a non-RT system.

TheIndependentAquarius 04-07-2012 06:39 AM

I know that RT is about determinism, but this load thing isn't clear for me yet.

In Xenomai and RTAI, they say that when a real time task comes the Linux is sidelined
till the real time task gets over.

In preempt_rt they say that whole kernel is preempted. What does that mean?
In what way is that different from Xenomai in terms of load bearing?

I read this: http://www.eetimes.com/design/embedd...dded-GNU-Linux, but still things aren't crystal clear.
Please explain.

macemoneta 04-07-2012 09:45 AM

Quote:

Originally Posted by Anisha Kaul (Post 4647031)
In preempt_rt they say that whole kernel is preempted. What does that mean?
In what way is that different from Xenomai in terms of load bearing?

Preempt_rt means that the kernel will interrupt an executing kernel task and stop dispatching work in order to meet a real-time deadline. Xenomai, from the description, is a realtime process, so it's just one of the hundreds of (mostly) non-real-time processes running on the system. Without preempt_rt the system will not interrupt its own work; it's softer real-time. As a result, there will be greater variability in the service time for processes (like Xenomai). That's the difference in load.

If your workload requires hard real-time (all deadlines need to be met), you need preempt_rt. If soft real-time is acceptable (some deadline misses OK), then Xenomai appears to perform that function. If you don't understand the differences, odds are you don't need real-time at all.

TheIndependentAquarius 04-07-2012 10:33 AM

Thanks for the explanation. I'll look more into both of them now.
Quote:

Originally Posted by macemoneta (Post 4647122)
If you don't understand the differences, odds are you don't need real-time at all.

I didn't find Xenomai mentioning about "soft" real time on their website. I'll check once again.

TheIndependentAquarius 04-07-2012 10:52 AM

Quote:

Xenomai is a real-time development framework cooperating with the Linux kernel, in order to provide a pervasive, interface-agnostic, hard real-time support to user-space applications, seamlessly integrated into the GNU/Linux environment
From: http://www.xenomai.org/index.php/Main_Page

Doesn't this mean that Xenomai provides hard real time?

macemoneta 04-07-2012 11:22 AM

If Xenomai is going to provide hard real-time, you need preempt_rt.

Update: From reading their FAQ, they appear to have a kernel patch that provides RT support, distinct from the standard kernel preempt_rt support. This seems kludgy to me.

TheIndependentAquarius 04-09-2012 06:38 AM

Finally, does the "load" here mean:

preempt_rt is bound to cause a reduction in the overall throughput of the system since there will be several context switches and also the lower priority tasks won't be getting much a chance to get through.

?

macemoneta 04-09-2012 07:27 AM

Load in this context refers to the work being performed by the kernel. While work performed by the kernel is in support of processes running on the system, it's not productive work; it's overhead. preempt_rt increases the amount of work the kernel must perform.

TheIndependentAquarius 04-09-2012 07:45 AM

Quote:

Originally Posted by macemoneta (Post 4648279)
While work performed by the kernel is in support of processes running on the system, it's not productive work

Which kind of work is that? Context switching? Or anything else?

macemoneta 04-09-2012 07:49 AM

Quote:

Originally Posted by Anisha Kaul (Post 4648286)
Which kind of work is that? Context switching? Or anything else?

Context switching, memory management, scheduling, dispatching, queuing, interrupt handling... Context switching is not a standalone function that operates independently.


All times are GMT -5. The time now is 04:17 PM.