Is built PREEMPT_RT more pre-emptive than PREEMPT_DYNAMIC set on full?

499 views Asked by At

I am curious if there is any difference functional wise of the pre-empting system between the the modes described in the title. I was looking at this page https://github.com/torvalds/linux/blob/master/kernel/Kconfig.preempt and ca't say for sure if there is a difference or not.

This article https://lwn.net/Articles/944686/ seems to suggest there is no difference...

How to tell ?

1

There are 1 answers

0
Marco Bonelli On BEST ANSWER

It seems pretty clear to me if you take a closer look at the article and kernel config options you link:

  • There are 4 "levels" of kernel preemptiveness possible: PREEMPT_NONE, PREEMPT_VOLUNTARY, PREEMPT (full) and PREEMPT_RT (real-time).
  • The last one (PREEMPT_RT) is the most aggressive and requires changes to kernel code that are only possible at build time.
  • The PREEMPT_DYNAMIC configuration option makes it possible to select among the first 3 levels (none, voluntary and full) at boot time through the kernel command line.
  • PREEMPT_DYNAMIC is not compatible with PREEMPT_RT, because the latter requires substantial build time changes to kernel code.

Therefore, running a kernel with PREEMPT_DYNAMIC set to full is roughly the same as running a kernel built with PREEMPT=y. PREEMPT_RT is more preemptive than "full" PREEMPT, but not available with PREEMPT_DYNAMIC.