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.h15
1 files changed, 14 insertions, 1 deletions
diff --git a/include/linux/sched.h b/include/linux/sched.h
index f34437e835a7..4059c0f33f07 100644
--- a/include/linux/sched.h
+++ b/include/linux/sched.h
@@ -145,6 +145,7 @@ extern unsigned long this_cpu_load(void);
145 145
146 146
147extern void calc_global_load(unsigned long ticks); 147extern void calc_global_load(unsigned long ticks);
148extern void update_cpu_load_nohz(void);
148 149
149extern unsigned long get_parent_ip(unsigned long addr); 150extern unsigned long get_parent_ip(unsigned long addr);
150 151
@@ -438,6 +439,7 @@ extern int get_dumpable(struct mm_struct *mm);
438 /* leave room for more dump flags */ 439 /* leave room for more dump flags */
439#define MMF_VM_MERGEABLE 16 /* KSM may merge identical pages */ 440#define MMF_VM_MERGEABLE 16 /* KSM may merge identical pages */
440#define MMF_VM_HUGEPAGE 17 /* set when VM_HUGEPAGE is set on vma */ 441#define MMF_VM_HUGEPAGE 17 /* set when VM_HUGEPAGE is set on vma */
442#define MMF_EXE_FILE_CHANGED 18 /* see prctl_set_mm_exe_file() */
441 443
442#define MMF_INIT_MASK (MMF_DUMPABLE_MASK | MMF_DUMP_FILTER_MASK) 444#define MMF_INIT_MASK (MMF_DUMPABLE_MASK | MMF_DUMP_FILTER_MASK)
443 445
@@ -875,6 +877,8 @@ struct sched_group_power {
875 * Number of busy cpus in this group. 877 * Number of busy cpus in this group.
876 */ 878 */
877 atomic_t nr_busy_cpus; 879 atomic_t nr_busy_cpus;
880
881 unsigned long cpumask[0]; /* iteration mask */
878}; 882};
879 883
880struct sched_group { 884struct sched_group {
@@ -899,6 +903,15 @@ static inline struct cpumask *sched_group_cpus(struct sched_group *sg)
899 return to_cpumask(sg->cpumask); 903 return to_cpumask(sg->cpumask);
900} 904}
901 905
906/*
907 * cpumask masking which cpus in the group are allowed to iterate up the domain
908 * tree.
909 */
910static inline struct cpumask *sched_group_mask(struct sched_group *sg)
911{
912 return to_cpumask(sg->sgp->cpumask);
913}
914
902/** 915/**
903 * group_first_cpu - Returns the first cpu in the cpumask of a sched_group. 916 * group_first_cpu - Returns the first cpu in the cpumask of a sched_group.
904 * @group: The group whose first cpu is to be returned. 917 * @group: The group whose first cpu is to be returned.
@@ -1187,7 +1200,6 @@ struct sched_rt_entity {
1187 struct list_head run_list; 1200 struct list_head run_list;
1188 unsigned long timeout; 1201 unsigned long timeout;
1189 unsigned int time_slice; 1202 unsigned int time_slice;
1190 int nr_cpus_allowed;
1191 1203
1192 struct sched_rt_entity *back; 1204 struct sched_rt_entity *back;
1193#ifdef CONFIG_RT_GROUP_SCHED 1205#ifdef CONFIG_RT_GROUP_SCHED
@@ -1252,6 +1264,7 @@ struct task_struct {
1252#endif 1264#endif
1253 1265
1254 unsigned int policy; 1266 unsigned int policy;
1267 int nr_cpus_allowed;
1255 cpumask_t cpus_allowed; 1268 cpumask_t cpus_allowed;
1256 1269
1257#ifdef CONFIG_PREEMPT_RCU 1270#ifdef CONFIG_PREEMPT_RCU