[PATCH] [CPUISOL] Add config options for CPU isolation

From: maxk
Date: Sun Jan 27 2008 - 23:34:26 EST


From: Max Krasnyansky <maxk@xxxxxxxxxxxx>

This simply adds a couple of new kconfig options for
configuring CPU isolation features.

Signed-off-by: Max Krasnyansky <maxk@xxxxxxxxxxxx>
---
arch/x86/Kconfig | 1 +
kernel/Kconfig.cpuisol | 24 ++++++++++++++++++++++++
2 files changed, 25 insertions(+), 0 deletions(-)
create mode 100644 kernel/Kconfig.cpuisol

diff --git a/arch/x86/Kconfig b/arch/x86/Kconfig
index 80b7ba4..b8f986e 100644
--- a/arch/x86/Kconfig
+++ b/arch/x86/Kconfig
@@ -495,6 +495,7 @@ config SCHED_MC
increased overhead in some places. If unsure say N here.

source "kernel/Kconfig.preempt"
+source "kernel/Kconfig.cpuisol"

config X86_UP_APIC
bool "Local APIC support on uniprocessors"
diff --git a/kernel/Kconfig.cpuisol b/kernel/Kconfig.cpuisol
new file mode 100644
index 0000000..6e099a4
--- /dev/null
+++ b/kernel/Kconfig.cpuisol
@@ -0,0 +1,24 @@
+config CPUISOL
+ depends on SMP
+ bool "CPU isolation"
+ help
+ This option enables support for CPU isolation.
+ If enabled the kernel will try to avoid kernel activity on the isolated CPUs.
+ By default user-space threads are not scheduled on the isolated CPUs unless
+ they explicitly request it (via sched_ and pthread_ affinity calls). Isolated
+ CPUs are not subject to the scheduler load-balancing algorithms.
+
+ CPUs can be marked as isolated using 'cpuisol=' command line option or by
+ writing '1' into /sys/devices/system/cpu/cpuN/isolated.
+
+ This feature is useful for hard realtime and high performance applications.
+ If unsure say 'N'.
+
+config CPUISOL_WORKQUEUE
+ bool "Do not schedule workqueues on isolated CPUs (EXPERIMENTAL)"
+ depends on CPUISOL && EXPERIMENTAL
+ help
+ In this option is enabled kernel will not schedule workqueues on the
+ isolated CPUs.
+ Please note that at this point this feature is experimental. It brakes
+ certain things like OProfile that heavily rely on per cpu workqueues.
--
1.5.3.7

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/