diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2008-07-23 22:36:53 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2008-07-23 22:36:53 -0400 |
commit | 7f9dce38378f0a4a298e885553d6bb7121376376 (patch) | |
tree | 5bfd688c9f356f7216bbc3cef3b4c10153de334b /include/linux | |
parent | 26dcce0fabbef75ae426461edf21b5030bad60f3 (diff) | |
parent | ba42059fbd0aa1ac91b582412b5fedb1258f241f (diff) |
Merge branch 'sched/for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip
* 'sched/for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip:
sched: hrtick_enabled() should use cpu_active()
sched, x86: clean up hrtick implementation
sched: fix build error, provide partition_sched_domains() unconditionally
sched: fix warning in inc_rt_tasks() to not declare variable 'rq' if it's not needed
cpu hotplug: Make cpu_active_map synchronization dependency clear
cpu hotplug, sched: Introduce cpu_active_map and redo sched domain managment (take 2)
sched: rework of "prioritize non-migratable tasks over migratable ones"
sched: reduce stack size in isolated_cpu_setup()
Revert parts of "ftrace: do not trace scheduler functions"
Fixed up conflicts in include/asm-x86/thread_info.h (due to the
TIF_SINGLESTEP unification vs TIF_HRTICK_RESCHED removal) and
kernel/sched_fair.c (due to cpu_active_map vs for_each_cpu_mask_nr()
introduction).
Diffstat (limited to 'include/linux')
-rw-r--r-- | include/linux/cpumask.h | 6 | ||||
-rw-r--r-- | include/linux/cpuset.h | 7 | ||||
-rw-r--r-- | include/linux/sched.h | 11 |
3 files changed, 22 insertions, 2 deletions
diff --git a/include/linux/cpumask.h b/include/linux/cpumask.h index 30d59d1d0626..1b5c98e7fef7 100644 --- a/include/linux/cpumask.h +++ b/include/linux/cpumask.h | |||
@@ -458,13 +458,14 @@ int __next_cpu_nr(int n, const cpumask_t *srcp); | |||
458 | 458 | ||
459 | /* | 459 | /* |
460 | * The following particular system cpumasks and operations manage | 460 | * The following particular system cpumasks and operations manage |
461 | * possible, present and online cpus. Each of them is a fixed size | 461 | * possible, present, active and online cpus. Each of them is a fixed size |
462 | * bitmap of size NR_CPUS. | 462 | * bitmap of size NR_CPUS. |
463 | * | 463 | * |
464 | * #ifdef CONFIG_HOTPLUG_CPU | 464 | * #ifdef CONFIG_HOTPLUG_CPU |
465 | * cpu_possible_map - has bit 'cpu' set iff cpu is populatable | 465 | * cpu_possible_map - has bit 'cpu' set iff cpu is populatable |
466 | * cpu_present_map - has bit 'cpu' set iff cpu is populated | 466 | * cpu_present_map - has bit 'cpu' set iff cpu is populated |
467 | * cpu_online_map - has bit 'cpu' set iff cpu available to scheduler | 467 | * cpu_online_map - has bit 'cpu' set iff cpu available to scheduler |
468 | * cpu_active_map - has bit 'cpu' set iff cpu available to migration | ||
468 | * #else | 469 | * #else |
469 | * cpu_possible_map - has bit 'cpu' set iff cpu is populated | 470 | * cpu_possible_map - has bit 'cpu' set iff cpu is populated |
470 | * cpu_present_map - copy of cpu_possible_map | 471 | * cpu_present_map - copy of cpu_possible_map |
@@ -515,6 +516,7 @@ int __next_cpu_nr(int n, const cpumask_t *srcp); | |||
515 | extern cpumask_t cpu_possible_map; | 516 | extern cpumask_t cpu_possible_map; |
516 | extern cpumask_t cpu_online_map; | 517 | extern cpumask_t cpu_online_map; |
517 | extern cpumask_t cpu_present_map; | 518 | extern cpumask_t cpu_present_map; |
519 | extern cpumask_t cpu_active_map; | ||
518 | 520 | ||
519 | #if NR_CPUS > 1 | 521 | #if NR_CPUS > 1 |
520 | #define num_online_cpus() cpus_weight_nr(cpu_online_map) | 522 | #define num_online_cpus() cpus_weight_nr(cpu_online_map) |
@@ -523,6 +525,7 @@ extern cpumask_t cpu_present_map; | |||
523 | #define cpu_online(cpu) cpu_isset((cpu), cpu_online_map) | 525 | #define cpu_online(cpu) cpu_isset((cpu), cpu_online_map) |
524 | #define cpu_possible(cpu) cpu_isset((cpu), cpu_possible_map) | 526 | #define cpu_possible(cpu) cpu_isset((cpu), cpu_possible_map) |
525 | #define cpu_present(cpu) cpu_isset((cpu), cpu_present_map) | 527 | #define cpu_present(cpu) cpu_isset((cpu), cpu_present_map) |
528 | #define cpu_active(cpu) cpu_isset((cpu), cpu_active_map) | ||
526 | #else | 529 | #else |
527 | #define num_online_cpus() 1 | 530 | #define num_online_cpus() 1 |
528 | #define num_possible_cpus() 1 | 531 | #define num_possible_cpus() 1 |
@@ -530,6 +533,7 @@ extern cpumask_t cpu_present_map; | |||
530 | #define cpu_online(cpu) ((cpu) == 0) | 533 | #define cpu_online(cpu) ((cpu) == 0) |
531 | #define cpu_possible(cpu) ((cpu) == 0) | 534 | #define cpu_possible(cpu) ((cpu) == 0) |
532 | #define cpu_present(cpu) ((cpu) == 0) | 535 | #define cpu_present(cpu) ((cpu) == 0) |
536 | #define cpu_active(cpu) ((cpu) == 0) | ||
533 | #endif | 537 | #endif |
534 | 538 | ||
535 | #define cpu_is_offline(cpu) unlikely(!cpu_online(cpu)) | 539 | #define cpu_is_offline(cpu) unlikely(!cpu_online(cpu)) |
diff --git a/include/linux/cpuset.h b/include/linux/cpuset.h index 038578362b47..e8f450c499b0 100644 --- a/include/linux/cpuset.h +++ b/include/linux/cpuset.h | |||
@@ -78,6 +78,8 @@ extern void cpuset_track_online_nodes(void); | |||
78 | 78 | ||
79 | extern int current_cpuset_is_being_rebound(void); | 79 | extern int current_cpuset_is_being_rebound(void); |
80 | 80 | ||
81 | extern void rebuild_sched_domains(void); | ||
82 | |||
81 | #else /* !CONFIG_CPUSETS */ | 83 | #else /* !CONFIG_CPUSETS */ |
82 | 84 | ||
83 | static inline int cpuset_init_early(void) { return 0; } | 85 | static inline int cpuset_init_early(void) { return 0; } |
@@ -156,6 +158,11 @@ static inline int current_cpuset_is_being_rebound(void) | |||
156 | return 0; | 158 | return 0; |
157 | } | 159 | } |
158 | 160 | ||
161 | static inline void rebuild_sched_domains(void) | ||
162 | { | ||
163 | partition_sched_domains(0, NULL, NULL); | ||
164 | } | ||
165 | |||
159 | #endif /* !CONFIG_CPUSETS */ | 166 | #endif /* !CONFIG_CPUSETS */ |
160 | 167 | ||
161 | #endif /* _LINUX_CPUSET_H */ | 168 | #endif /* _LINUX_CPUSET_H */ |
diff --git a/include/linux/sched.h b/include/linux/sched.h index af443a08431f..dc7e592c473a 100644 --- a/include/linux/sched.h +++ b/include/linux/sched.h | |||
@@ -825,7 +825,16 @@ extern void partition_sched_domains(int ndoms_new, cpumask_t *doms_new, | |||
825 | struct sched_domain_attr *dattr_new); | 825 | struct sched_domain_attr *dattr_new); |
826 | extern int arch_reinit_sched_domains(void); | 826 | extern int arch_reinit_sched_domains(void); |
827 | 827 | ||
828 | #endif /* CONFIG_SMP */ | 828 | #else /* CONFIG_SMP */ |
829 | |||
830 | struct sched_domain_attr; | ||
831 | |||
832 | static inline void | ||
833 | partition_sched_domains(int ndoms_new, cpumask_t *doms_new, | ||
834 | struct sched_domain_attr *dattr_new) | ||
835 | { | ||
836 | } | ||
837 | #endif /* !CONFIG_SMP */ | ||
829 | 838 | ||
830 | struct io_context; /* See blkdev.h */ | 839 | struct io_context; /* See blkdev.h */ |
831 | #define NGROUPS_SMALL 32 | 840 | #define NGROUPS_SMALL 32 |