Merge tag 'modules-for-v5.12' of git://git.kernel.org/pub/scm/linux/kernel/git/jeyu...
[linux-2.6-microblaze.git] / kernel / Kconfig.preempt
index bf82259..4160173 100644 (file)
@@ -40,6 +40,7 @@ config PREEMPT
        depends on !ARCH_NO_PREEMPT
        select PREEMPTION
        select UNINLINE_SPIN_UNLOCK if !ARCH_INLINE_SPIN_UNLOCK
+       select PREEMPT_DYNAMIC if HAVE_PREEMPT_DYNAMIC
        help
          This option reduces the latency of the kernel by making
          all kernel code (that is not executing in a critical section)
@@ -80,3 +81,21 @@ config PREEMPT_COUNT
 config PREEMPTION
        bool
        select PREEMPT_COUNT
+
+config PREEMPT_DYNAMIC
+       bool
+       help
+         This option allows to define the preemption model on the kernel
+         command line parameter and thus override the default preemption
+         model defined during compile time.
+
+         The feature is primarily interesting for Linux distributions which
+         provide a pre-built kernel binary to reduce the number of kernel
+         flavors they offer while still offering different usecases.
+
+         The runtime overhead is negligible with HAVE_STATIC_CALL_INLINE enabled
+         but if runtime patching is not available for the specific architecture
+         then the potential overhead should be considered.
+
+         Interesting if you want the same pre-built kernel should be used for
+         both Server and Desktop workloads.