diff options
author | Hidetoshi Seto <seto.hidetoshi@jp.fujitsu.com> | 2008-04-15 01:04:23 -0400 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2008-04-19 13:45:00 -0400 |
commit | 1d3504fcf5606579d60b649d19f44b3871c1ddae (patch) | |
tree | 001a1b57bd7f123fd51361d78d9277b2dcac1bf3 /include/linux/sched.h | |
parent | 4d5f35533fb9b2cd553cec6611195bcbfb7ffd84 (diff) |
sched, cpuset: customize sched domains, core
[rebased for sched-devel/latest]
- Add a new cpuset file, having levels:
sched_relax_domain_level
- Modify partition_sched_domains() and build_sched_domains()
to take attributes parameter passed from cpuset.
- Fill newidle_idx for node domains which currently unused but
might be required if sched_relax_domain_level become higher.
- We can change the default level by boot option 'relax_domain_level='.
Signed-off-by: Hidetoshi Seto <seto.hidetoshi@jp.fujitsu.com>
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, 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 | ||
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 */ |