Real-Time Linux (PREEMPT-RT) (Thomas Gleixner)

PREEMPT-RT in 3.6 got some big changes: softirq processing, SLUB allocator, PREEMPT_LAZY.

softirq processing: there’s a single softirq thread, but it runs in the context that raised the softirq. Softirq runs under a lock – but each softirq has its own lock, so priorities work. This makes sure that there is no context switch unless there is a higher-priority thread that has to be run first. Still need to solve a few things which don’t have a context.

Preempt-RT uses SLUB allocator, because its changes are less intrusive. Easier to make it preemptible than other allocators.

PREEMPT_LAZY: this makes sure that the SCHED_OTHER tasks behave similar to how the scheduler handles them in a non-preemptible kernel. That makes the usual non-RT benchmarks still perform well even under PREEMPT_RT.

SLUB + PREEMPT_LAZY increase non-RT throughput by 60% on some benchmark.

PREEMPT-RT is now production quality: largely upstreamed, and stable releases that follow the mainline stable releases. Still missing in mainline: memory management solutions, hrtimers, soft interrupts. The patches are not in upstream quality. Also things like memory management is something that people don’t like to change. HRtimers is just a lack of time. Softirq is still a bit hackish because it intrudes in the normal softirq code.

Userbase: Thomas gathered download statics. 75% of downloads can be traced to corporate entities (2250 entitities), but those aren’t really contributing back (not even bug reports).

In the pipeline:

  • Adaptive NOHZ: avoid timer tick interrupt in critical polling code. If there is only one runnable entitiy, the timer tick is suspended. Similar to nohz, but for one runnable task instead of zero runnable tasks.
  • Early deadline first scheduling: hopefully in mainline by 3.8.
  • Realtime in KVM guest. ??? Thomas doesn’t understand it either, it’s a research project 🙂

 

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s