diff options
author | Peter Zijlstra <a.p.zijlstra@chello.nl> | 2011-04-07 08:10:04 -0400 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2011-04-11 08:09:32 -0400 |
commit | 60495e7760d8ee364695006af37309b0755e0e17 (patch) | |
tree | 1c842c0797a6a6b0066b18f296661fcf77cd0d0a /include/linux/sched.h | |
parent | 54ab4ff4316eb329d2c1acc110fbc623d2966931 (diff) |
sched: Dynamic sched_domain::level
Remove the SD_LV_ enum and use dynamic level assignments.
Signed-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Mike Galbraith <efault@gmx.de>
Cc: Nick Piggin <npiggin@kernel.dk>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Andrew Morton <akpm@linux-foundation.org>
Link: http://lkml.kernel.org/r/20110407122942.969433965@chello.nl
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'include/linux/sched.h')
-rw-r--r-- | include/linux/sched.h | 23 |
1 files changed, 3 insertions, 20 deletions
diff --git a/include/linux/sched.h b/include/linux/sched.h index 09d9e02f2b61..e43e5b0ab0b5 100644 --- a/include/linux/sched.h +++ b/include/linux/sched.h | |||
@@ -892,25 +892,6 @@ static inline struct cpumask *sched_group_cpus(struct sched_group *sg) | |||
892 | return to_cpumask(sg->cpumask); | 892 | return to_cpumask(sg->cpumask); |
893 | } | 893 | } |
894 | 894 | ||
895 | enum sched_domain_level { | ||
896 | SD_LV_NONE = 0, | ||
897 | #ifdef CONFIG_SCHED_SMT | ||
898 | SD_LV_SIBLING, | ||
899 | #endif | ||
900 | #ifdef CONFIG_SCHED_MC | ||
901 | SD_LV_MC, | ||
902 | #endif | ||
903 | #ifdef CONFIG_SCHED_BOOK | ||
904 | SD_LV_BOOK, | ||
905 | #endif | ||
906 | SD_LV_CPU, | ||
907 | #ifdef CONFIG_NUMA | ||
908 | SD_LV_NODE, | ||
909 | SD_LV_ALLNODES, | ||
910 | #endif | ||
911 | SD_LV_MAX | ||
912 | }; | ||
913 | |||
914 | struct sched_domain_attr { | 895 | struct sched_domain_attr { |
915 | int relax_domain_level; | 896 | int relax_domain_level; |
916 | }; | 897 | }; |
@@ -919,6 +900,8 @@ struct sched_domain_attr { | |||
919 | .relax_domain_level = -1, \ | 900 | .relax_domain_level = -1, \ |
920 | } | 901 | } |
921 | 902 | ||
903 | extern int sched_domain_level_max; | ||
904 | |||
922 | struct sched_domain { | 905 | struct sched_domain { |
923 | /* These fields must be setup */ | 906 | /* These fields must be setup */ |
924 | struct sched_domain *parent; /* top domain must be null terminated */ | 907 | struct sched_domain *parent; /* top domain must be null terminated */ |
@@ -936,7 +919,7 @@ struct sched_domain { | |||
936 | unsigned int forkexec_idx; | 919 | unsigned int forkexec_idx; |
937 | unsigned int smt_gain; | 920 | unsigned int smt_gain; |
938 | int flags; /* See SD_* */ | 921 | int flags; /* See SD_* */ |
939 | enum sched_domain_level level; | 922 | int level; |
940 | 923 | ||
941 | /* Runtime fields. */ | 924 | /* Runtime fields. */ |
942 | unsigned long last_balance; /* init to jiffies. units in jiffies */ | 925 | unsigned long last_balance; /* init to jiffies. units in jiffies */ |