preempt: Introduce CONFIG_PREEMPT_DYNAMIC
[sfrench/cifs-2.6.git] / kernel / Kconfig.preempt
index bf82259cff9654a625042e3befa426bb866ce89f..4160173016605d7f2e19982ca77a1ba3812faa83 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.