summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorPaul Jackson <pj@sgi.com>2007-10-18 23:40:20 -0700
committerLinus Torvalds <torvalds@woody.linux-foundation.org>2007-10-19 11:53:41 -0700
commit029190c515f15f512ac85de8fc686d4dbd0ae731 (patch)
treea946f9223d17e945141fef81f94a75b38e2cc6ef /include
parent2f2a3a46fcafa7a12d61454f67f932dfe7d84c60 (diff)
downloadlinux-3.10-029190c515f15f512ac85de8fc686d4dbd0ae731.tar.gz
linux-3.10-029190c515f15f512ac85de8fc686d4dbd0ae731.tar.bz2
linux-3.10-029190c515f15f512ac85de8fc686d4dbd0ae731.zip
cpuset sched_load_balance flag
Add a new per-cpuset flag called 'sched_load_balance'. When enabled in a cpuset (the default value) it tells the kernel scheduler that the scheduler should provide the normal load balancing on the CPUs in that cpuset, sometimes moving tasks from one CPU to a second CPU if the second CPU is less loaded and if that task is allowed to run there. When disabled (write "0" to the file) then it tells the kernel scheduler that load balancing is not required for the CPUs in that cpuset. Now even if this flag is disabled for some cpuset, the kernel may still have to load balance some or all the CPUs in that cpuset, if some overlapping cpuset has its sched_load_balance flag enabled. If there are some CPUs that are not in any cpuset whose sched_load_balance flag is enabled, the kernel scheduler will not load balance tasks to those CPUs. Moreover the kernel will partition the 'sched domains' (non-overlapping sets of CPUs over which load balancing is attempted) into the finest granularity partition that it can find, while still keeping any two CPUs that are in the same shed_load_balance enabled cpuset in the same element of the partition. This serves two purposes: 1) It provides a mechanism for real time isolation of some CPUs, and 2) it can be used to improve performance on systems with many CPUs by supporting configurations in which load balancing is not done across all CPUs at once, but rather only done in several smaller disjoint sets of CPUs. This mechanism replaces the earlier overloading of the per-cpuset flag 'cpu_exclusive', which overloading was removed in an earlier patch: cpuset-remove-sched-domain-hooks-from-cpusets See further the Documentation and comments in the code itself. [akpm@linux-foundation.org: don't be weird] Signed-off-by: Paul Jackson <pj@sgi.com> Acked-by: Ingo Molnar <mingo@elte.hu> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'include')
-rw-r--r--include/linux/sched.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/include/linux/sched.h b/include/linux/sched.h
index cbd8731a66e..4bbbe12880d 100644
--- a/include/linux/sched.h
+++ b/include/linux/sched.h
@@ -737,6 +737,8 @@ struct sched_domain {
#endif
};
+extern void partition_sched_domains(int ndoms_new, cpumask_t *doms_new);
+
#endif /* CONFIG_SMP */
/*