Hi all, I am trying to find detailed explanation of preemption option in config. For desktop, server, and low-latency desktop. Can anyone explain in what scenarios these are useful. Thanks in advance -- Regards, Sri.
If you haven't already run into it: https://rt.wiki.kernel.org/index.php/Main_Page In a high level sense, the option compiles the Linux kernel so that certain kernel operations can be preempted - in other words the kernel can be told to wait while another higher priority task needs to be completed. This is useful we you need to handle time sensitive tasks, like handling precision timers or hardware interrupts, timing sensitive device drivers, safety critical programs, etc. The is especially useful in embedded applications, or audio intensive application where low latency is required. If you do a search for "Real Time Linux", you will find a lot more information. Linux with the preemptive patch applied is often called a "real time" operating system. "Real time" in a basic sense means "very low latency". "Hard real time" OS's, like eCos, freeRTOS, QNX, allow the most basic kernel operations to be preempted, useful for the most timing critical operations were a few milliseconds in delay of an operation can mean system failure or computational error. Linux with the preemptive option can be considered a "soft real time" OS, meaning not all kernel operations can preempted, if I'm not mistaken. There is however, a patch ( https://rt.wiki.kernel.org/index.php/CONFIG_PREEMPT_RT_Patch) that allows Linux to behave in a more "hard real time" manner. The patch allows most kernel operations to be preempted but not all. If you need very low latency "hard real time" behavior with Linux, you can use something like RTAI or Xenomai. These achieve hard real time performance by running the Linux kernel as a child process to their own parent process, allowing every task to be preempted if needed. Thus, RTAI and Xenomai are also popular in embedded systems where the use of Linux is preferred, but very low latency is required as well. It's a lot of information, but hopefully you'll find it useful! - Sabree Blackmon On Wed, Feb 2, 2011 at 3:32 PM, Sri Ram Vemulpali <sri.ram.gmu06@gmail.com>wrote:
Hi all,
I am trying to find detailed explanation of preemption option in config. For desktop, server, and low-latency desktop. Can anyone explain in what scenarios these are useful.
Thanks in advance
-- Regards, Sri.
_______________________________________________ Kernelnewbies mailing list Kernelnewbies@kernelnewbies.org http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
Hi Sri,
I am trying to find detailed explanation of preemption option in config. For desktop, server, and low-latency desktop. Can anyone explain in what scenarios these are useful.
Free Electrons has a great presentation about real-time Linux [1]. They go into some detail on the specific options of the rt-preempt patches on page 26 of their slides [2]. The other slides of the presentation are obviously a great read as well. Also, if you are interested in learning about real-time and issues related to it (and not specifically the rt-preempt patches), I recommend checking out the ELC 2010 video of the talk "Real-Time Linux Failure" by Frank Rowand [3] as well as Mike Anderson's excellent talk "Using Interrupt Threads to Prioritize Interrupts" [3]. IIRC the latter goes into details of the rt-preempt patches and explains the issues and solutions involved quite well. Hope this helps :-) [1] http://free-electrons.com/docs/realtime/ [2] http://free-electrons.com/doc/embedded_linux_realtime.pdf [3] http://free-electrons.com/blog/elc-2010-videos/ -- /manohar
Just adding :) On Thu, Feb 3, 2011 at 04:32, Sri Ram Vemulpali <sri.ram.gmu06@gmail.com> wrote:
Hi all,
I am trying to find detailed explanation of preemption option in config. For desktop, server, and low-latency desktop. Can anyone explain in what scenarios these are useful.
for server, quite likely you need preempt voluntary or none. The reason: you need to get the things get done fast, but user responsiveness (i.e GUI click response) could be sacrificed for desktop: between voluntary or full preempt. reason: you likely need fast response (i.e responding mouse click). Full preempt allow kernel to do context switch even if it's still in kernel mode, as long as preemption is allowed. if you're in doubt, pick voluntary... :) -- regards, Mulyadi Santosa Freelance Linux trainer and consultant blog: the-hydra.blogspot.com training: mulyaditraining.blogspot.com
participants (4)
-
Manohar Vanga -
Mulyadi Santosa -
Sabree Blackmon -
Sri Ram Vemulpali