diff options
Diffstat (limited to 'include')
-rw-r--r-- | include/asm-ia64/topology.h | 2 | ||||
-rw-r--r-- | include/asm-sh/topology.h | 2 | ||||
-rw-r--r-- | include/asm-x86/topology.h | 2 | ||||
-rw-r--r-- | include/linux/sched.h | 23 |
4 files changed, 25 insertions, 4 deletions
diff --git a/include/asm-ia64/topology.h b/include/asm-ia64/topology.h index f929dde85343..f2f72ef2a897 100644 --- a/include/asm-ia64/topology.h +++ b/include/asm-ia64/topology.h | |||
@@ -93,7 +93,7 @@ void build_cpu_to_node_map(void); | |||
93 | .cache_nice_tries = 2, \ | 93 | .cache_nice_tries = 2, \ |
94 | .busy_idx = 3, \ | 94 | .busy_idx = 3, \ |
95 | .idle_idx = 2, \ | 95 | .idle_idx = 2, \ |
96 | .newidle_idx = 0, /* unused */ \ | 96 | .newidle_idx = 2, \ |
97 | .wake_idx = 1, \ | 97 | .wake_idx = 1, \ |
98 | .forkexec_idx = 1, \ | 98 | .forkexec_idx = 1, \ |
99 | .flags = SD_LOAD_BALANCE \ | 99 | .flags = SD_LOAD_BALANCE \ |
diff --git a/include/asm-sh/topology.h b/include/asm-sh/topology.h index f402a3b1cfa4..34cdb28e8f44 100644 --- a/include/asm-sh/topology.h +++ b/include/asm-sh/topology.h | |||
@@ -16,7 +16,7 @@ | |||
16 | .cache_nice_tries = 2, \ | 16 | .cache_nice_tries = 2, \ |
17 | .busy_idx = 3, \ | 17 | .busy_idx = 3, \ |
18 | .idle_idx = 2, \ | 18 | .idle_idx = 2, \ |
19 | .newidle_idx = 0, \ | 19 | .newidle_idx = 2, \ |
20 | .wake_idx = 1, \ | 20 | .wake_idx = 1, \ |
21 | .forkexec_idx = 1, \ | 21 | .forkexec_idx = 1, \ |
22 | .flags = SD_LOAD_BALANCE \ | 22 | .flags = SD_LOAD_BALANCE \ |
diff --git a/include/asm-x86/topology.h b/include/asm-x86/topology.h index 9ef74c5d5ad6..22073268b481 100644 --- a/include/asm-x86/topology.h +++ b/include/asm-x86/topology.h | |||
@@ -147,7 +147,7 @@ extern unsigned long node_remap_size[]; | |||
147 | 147 | ||
148 | # define SD_CACHE_NICE_TRIES 2 | 148 | # define SD_CACHE_NICE_TRIES 2 |
149 | # define SD_IDLE_IDX 2 | 149 | # define SD_IDLE_IDX 2 |
150 | # define SD_NEWIDLE_IDX 0 | 150 | # define SD_NEWIDLE_IDX 2 |
151 | # define SD_FORKEXEC_IDX 1 | 151 | # define SD_FORKEXEC_IDX 1 |
152 | 152 | ||
153 | #endif | 153 | #endif |
diff --git a/include/linux/sched.h b/include/linux/sched.h index ada24022d230..11f47249cdd2 100644 --- a/include/linux/sched.h +++ b/include/linux/sched.h | |||
@@ -704,6 +704,7 @@ enum cpu_idle_type { | |||
704 | #define SD_POWERSAVINGS_BALANCE 256 /* Balance for power savings */ | 704 | #define SD_POWERSAVINGS_BALANCE 256 /* Balance for power savings */ |
705 | #define SD_SHARE_PKG_RESOURCES 512 /* Domain members share cpu pkg resources */ | 705 | #define SD_SHARE_PKG_RESOURCES 512 /* Domain members share cpu pkg resources */ |
706 | #define SD_SERIALIZE 1024 /* Only a single load balancing instance */ | 706 | #define SD_SERIALIZE 1024 /* Only a single load balancing instance */ |
707 | #define SD_WAKE_IDLE_FAR 2048 /* Gain latency sacrificing cache hit */ | ||
707 | 708 | ||
708 | #define BALANCE_FOR_MC_POWER \ | 709 | #define BALANCE_FOR_MC_POWER \ |
709 | (sched_smt_power_savings ? SD_POWERSAVINGS_BALANCE : 0) | 710 | (sched_smt_power_savings ? SD_POWERSAVINGS_BALANCE : 0) |
@@ -733,6 +734,24 @@ struct sched_group { | |||
733 | u32 reciprocal_cpu_power; | 734 | u32 reciprocal_cpu_power; |
734 | }; | 735 | }; |
735 | 736 | ||
737 | enum sched_domain_level { | ||
738 | SD_LV_NONE = 0, | ||
739 | SD_LV_SIBLING, | ||
740 | SD_LV_MC, | ||
741 | SD_LV_CPU, | ||
742 | SD_LV_NODE, | ||
743 | SD_LV_ALLNODES, | ||
744 | SD_LV_MAX | ||
745 | }; | ||
746 | |||
747 | struct sched_domain_attr { | ||
748 | int relax_domain_level; | ||
749 | }; | ||
750 | |||
751 | #define SD_ATTR_INIT (struct sched_domain_attr) { \ | ||
752 | .relax_domain_level = -1, \ | ||
753 | } | ||
754 | |||
736 | struct sched_domain { | 755 | struct sched_domain { |
737 | /* These fields must be setup */ | 756 | /* These fields must be setup */ |
738 | struct sched_domain *parent; /* top domain must be null terminated */ | 757 | struct sched_domain *parent; /* top domain must be null terminated */ |
@@ -750,6 +769,7 @@ struct sched_domain { | |||
750 | unsigned int wake_idx; | 769 | unsigned int wake_idx; |
751 | unsigned int forkexec_idx; | 770 | unsigned int forkexec_idx; |
752 | int flags; /* See SD_* */ | 771 | int flags; /* See SD_* */ |
772 | enum sched_domain_level level; | ||
753 | 773 | ||
754 | /* Runtime fields. */ | 774 | /* Runtime fields. */ |
755 | unsigned long last_balance; /* init to jiffies. units in jiffies */ | 775 | unsigned long last_balance; /* init to jiffies. units in jiffies */ |
@@ -789,7 +809,8 @@ struct sched_domain { | |||
789 | #endif | 809 | #endif |
790 | }; | 810 | }; |
791 | 811 | ||
792 | extern void partition_sched_domains(int ndoms_new, cpumask_t *doms_new); | 812 | extern void partition_sched_domains(int ndoms_new, cpumask_t *doms_new, |
813 | struct sched_domain_attr *dattr_new); | ||
793 | extern int arch_reinit_sched_domains(void); | 814 | extern int arch_reinit_sched_domains(void); |
794 | 815 | ||
795 | #endif /* CONFIG_SMP */ | 816 | #endif /* CONFIG_SMP */ |