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.h58
1 files changed, 2 insertions, 56 deletions
diff --git a/include/linux/sched.h b/include/linux/sched.h
index f8826d04fb12..0d641304c0ff 100644
--- a/include/linux/sched.h
+++ b/include/linux/sched.h
@@ -780,62 +780,6 @@ enum cpu_idle_type {
780 780
781extern int __weak arch_sd_sibiling_asym_packing(void); 781extern int __weak arch_sd_sibiling_asym_packing(void);
782 782
783struct sched_group_power {
784 atomic_t ref;
785 /*
786 * CPU power of this group, SCHED_LOAD_SCALE being max power for a
787 * single CPU.
788 */
789 unsigned int power, power_orig;
790 unsigned long next_update;
791 /*
792 * Number of busy cpus in this group.
793 */
794 atomic_t nr_busy_cpus;
795
796 unsigned long cpumask[0]; /* iteration mask */
797};
798
799struct sched_group {
800 struct sched_group *next; /* Must be a circular list */
801 atomic_t ref;
802
803 unsigned int group_weight;
804 struct sched_group_power *sgp;
805
806 /*
807 * The CPUs this group covers.
808 *
809 * NOTE: this field is variable length. (Allocated dynamically
810 * by attaching extra space to the end of the structure,
811 * depending on how many CPUs the kernel has booted up with)
812 */
813 unsigned long cpumask[0];
814};
815
816static inline struct cpumask *sched_group_cpus(struct sched_group *sg)
817{
818 return to_cpumask(sg->cpumask);
819}
820
821/*
822 * cpumask masking which cpus in the group are allowed to iterate up the domain
823 * tree.
824 */
825static inline struct cpumask *sched_group_mask(struct sched_group *sg)
826{
827 return to_cpumask(sg->sgp->cpumask);
828}
829
830/**
831 * group_first_cpu - Returns the first cpu in the cpumask of a sched_group.
832 * @group: The group whose first cpu is to be returned.
833 */
834static inline unsigned int group_first_cpu(struct sched_group *group)
835{
836 return cpumask_first(sched_group_cpus(group));
837}
838
839struct sched_domain_attr { 783struct sched_domain_attr {
840 int relax_domain_level; 784 int relax_domain_level;
841}; 785};
@@ -846,6 +790,8 @@ struct sched_domain_attr {
846 790
847extern int sched_domain_level_max; 791extern int sched_domain_level_max;
848 792
793struct sched_group;
794
849struct sched_domain { 795struct sched_domain {
850 /* These fields must be setup */ 796 /* These fields must be setup */
851 struct sched_domain *parent; /* top domain must be null terminated */ 797 struct sched_domain *parent; /* top domain must be null terminated */