Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.

Overview of Linux real-time challenges


Published on

My talk at foss-sthlm embedded Linux hacking day, June 1st 2013.

Published in: Technology
  • If you are looking for trusted essay writing service I highly recommend ⇒⇒⇒ ⇐⇐⇐ The service I received was great. I got an A on my final paper which really helped my grade. Knowing that I can count on them in the future has really helped relieve the stress, anxiety and workload. I recommend everyone to give them a try. You'll be glad you did.
    Are you sure you want to  Yes  No
    Your message goes here
  • Dating direct: ❶❶❶ ❶❶❶
    Are you sure you want to  Yes  No
    Your message goes here
  • Sex in your area is here: ❶❶❶ ❶❶❶
    Are you sure you want to  Yes  No
    Your message goes here

Overview of Linux real-time challenges

  1. 1. Overview of Linux real­time challengesJune 1, 2013
  2. 2. Daniel StenbergEmail: daniel@haxx.seTwitter: @bagderWeb: daniel.haxx.seBlog:●Free Software●Network hacker●Embedded developer●Consultant
  3. 3. AgendaWhats real-time in this context?Why is real-time still a concern?Ways to deal with the problem• Off to secondary hardware• Hypervisor or AMP• PREEMPT_RT• CPU isolation and dynamic tickFuture?
  4. 4. Real­timeReal-time can mean a lot of differentthings to different audiences• Low maximum latency: below 100 us,sometimes down to 20us• Very low risk of every breaking that
  5. 5. Why is this a concern 2013?• Plain Linux wasnt designed to deal with low latency• A move towards "commodity" hardware - lessspecial stuff means solving the problems in generalCPUs• Linux everywhere: RTOS-solutions get moved overfrom legacy systems to Linux-based• Still a lot of stacks and applications that act in CPUbut needs to respond fast and accurately• Sometimes a bit more requested than perhaps canbe technically motivated
  6. 6. What are the options?Linux is a given.What magic can you apply to a systemto address the problem of a lowmaximum latency?
  7. 7. Separate dedicated HW• A tested and proven way• A separate small chip (with anRTOS?) for just the time critical stuff• ... or an FPGA• But it adds system complexity andprice
  8. 8. Hypervisor with RTOS• Isnt pure Linux• Adds complexity• Usually proprietary• May reach really low latenciesOne or more cores
  9. 9. AMP with RTOS• Isnt pure Linux• Adds complexity• Often proprietary• May reach really low latenciesCore 0 Core 1 Core 2 Core 3
  10. 10. The more pure Linux solutions1 ­ Address and lower the worst case2 ­ Avoid hitting the worst case
  11. 11. PREEMPT_RT●An off­mainline patch since 10+ years!●Add preemption to lower max latency●replace kernel spinlocks with mutexes●move interrupts and software interrupts to kernel threads●works on single core systems●Changes behavior and requires drivers to be tested●User­space is the same
  12. 12. CPU isolation 1/2●NOHZ, dynamic tick●Isolated cores == without ticks do nothing!●Only one thread allowed!●Avoiding the kernel is hard●Approaching mainline (3.10)●Requires rethinking user­space
  13. 13. Linux kernelCore 0 Core 1 Core 2 Core 3CPU isolation 2/2
  14. 14. Future●Real­time and latency remain interesting●PREEMPT_RT is not in mainline●NOHZ is just getting in●We create the future!
  15. 15. (from UBM Tech Electronics Embedded Market Survery)
  16. 16. Work with this at Enea
  17. 17. Thank youDaniel Stenberg <>