aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/sched.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/linux/sched.h')
-rw-r--r--include/linux/sched.h23
1 files changed, 22 insertions, 1 deletions
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
737enum 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
747struct 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
736struct sched_domain { 755struct 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
792extern void partition_sched_domains(int ndoms_new, cpumask_t *doms_new); 812extern void partition_sched_domains(int ndoms_new, cpumask_t *doms_new,
813 struct sched_domain_attr *dattr_new);
793extern int arch_reinit_sched_domains(void); 814extern int arch_reinit_sched_domains(void);
794 815
795#endif /* CONFIG_SMP */ 816#endif /* CONFIG_SMP */