diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2012-07-26 16:08:01 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2012-07-26 16:08:01 -0400 |
commit | 79071638ce655c1f78a50d05c7dae0ad04a3e92a (patch) | |
tree | d9e76997c418b78a2485ac50d5970f7d420a5600 /include | |
parent | 44a6b8442190cf213081060b610dae2e822f802b (diff) | |
parent | 8323f26ce3425460769605a6aece7a174edaa7d1 (diff) |
Merge branch 'sched-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip
Pull scheduler changes from Ingo Molnar:
"The biggest change is a performance improvement on SMP systems:
| 4 socket 40 core + SMT Westmere box, single 30 sec tbench
| runs, higher is better:
|
| clients 1 2 4 8 16 32 64 128
|..........................................................................
| pre 30 41 118 645 3769 6214 12233 14312
| post 299 603 1211 2418 4697 6847 11606 14557
|
| A nice increase in performance.
which speedup is particularly noticeable on heavily interacting
few-tasks workloads, so the changes should help desktop-style Xorg
workloads and interactivity as well, on multi-core CPUs.
There are also cpuset suspend behavior fixes/restructuring and various
smaller tweaks."
* 'sched-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
sched: Fix race in task_group()
sched: Improve balance_cpu() to consider other cpus in its group as target of (pinned) task
sched: Reset loop counters if all tasks are pinned and we need to redo load balance
sched: Reorder 'struct lb_env' members to reduce its size
sched: Improve scalability via 'CPU buddies', which withstand random perturbations
cpusets: Remove/update outdated comments
cpusets, hotplug: Restructure functions that are invoked during hotplug
cpusets, hotplug: Implement cpuset tree traversal in a helper function
CPU hotplug, cpusets, suspend: Don't modify cpusets during suspend/resume
sched/x86: Remove broken power estimation
Diffstat (limited to 'include')
-rw-r--r-- | include/linux/cpuset.h | 4 | ||||
-rw-r--r-- | include/linux/init_task.h | 12 | ||||
-rw-r--r-- | include/linux/sched.h | 6 |
3 files changed, 18 insertions, 4 deletions
diff --git a/include/linux/cpuset.h b/include/linux/cpuset.h index 668f66baac7b..838320fc3d1d 100644 --- a/include/linux/cpuset.h +++ b/include/linux/cpuset.h | |||
@@ -20,7 +20,7 @@ extern int number_of_cpusets; /* How many cpusets are defined in system? */ | |||
20 | 20 | ||
21 | extern int cpuset_init(void); | 21 | extern int cpuset_init(void); |
22 | extern void cpuset_init_smp(void); | 22 | extern void cpuset_init_smp(void); |
23 | extern void cpuset_update_active_cpus(void); | 23 | extern void cpuset_update_active_cpus(bool cpu_online); |
24 | extern void cpuset_cpus_allowed(struct task_struct *p, struct cpumask *mask); | 24 | extern void cpuset_cpus_allowed(struct task_struct *p, struct cpumask *mask); |
25 | extern void cpuset_cpus_allowed_fallback(struct task_struct *p); | 25 | extern void cpuset_cpus_allowed_fallback(struct task_struct *p); |
26 | extern nodemask_t cpuset_mems_allowed(struct task_struct *p); | 26 | extern nodemask_t cpuset_mems_allowed(struct task_struct *p); |
@@ -124,7 +124,7 @@ static inline void set_mems_allowed(nodemask_t nodemask) | |||
124 | static inline int cpuset_init(void) { return 0; } | 124 | static inline int cpuset_init(void) { return 0; } |
125 | static inline void cpuset_init_smp(void) {} | 125 | static inline void cpuset_init_smp(void) {} |
126 | 126 | ||
127 | static inline void cpuset_update_active_cpus(void) | 127 | static inline void cpuset_update_active_cpus(bool cpu_online) |
128 | { | 128 | { |
129 | partition_sched_domains(1, NULL, NULL); | 129 | partition_sched_domains(1, NULL, NULL); |
130 | } | 130 | } |
diff --git a/include/linux/init_task.h b/include/linux/init_task.h index 8a7476186990..89f1cb1056f0 100644 --- a/include/linux/init_task.h +++ b/include/linux/init_task.h | |||
@@ -123,8 +123,17 @@ extern struct group_info init_groups; | |||
123 | 123 | ||
124 | extern struct cred init_cred; | 124 | extern struct cred init_cred; |
125 | 125 | ||
126 | extern struct task_group root_task_group; | ||
127 | |||
128 | #ifdef CONFIG_CGROUP_SCHED | ||
129 | # define INIT_CGROUP_SCHED(tsk) \ | ||
130 | .sched_task_group = &root_task_group, | ||
131 | #else | ||
132 | # define INIT_CGROUP_SCHED(tsk) | ||
133 | #endif | ||
134 | |||
126 | #ifdef CONFIG_PERF_EVENTS | 135 | #ifdef CONFIG_PERF_EVENTS |
127 | # define INIT_PERF_EVENTS(tsk) \ | 136 | # define INIT_PERF_EVENTS(tsk) \ |
128 | .perf_event_mutex = \ | 137 | .perf_event_mutex = \ |
129 | __MUTEX_INITIALIZER(tsk.perf_event_mutex), \ | 138 | __MUTEX_INITIALIZER(tsk.perf_event_mutex), \ |
130 | .perf_event_list = LIST_HEAD_INIT(tsk.perf_event_list), | 139 | .perf_event_list = LIST_HEAD_INIT(tsk.perf_event_list), |
@@ -161,6 +170,7 @@ extern struct cred init_cred; | |||
161 | }, \ | 170 | }, \ |
162 | .tasks = LIST_HEAD_INIT(tsk.tasks), \ | 171 | .tasks = LIST_HEAD_INIT(tsk.tasks), \ |
163 | INIT_PUSHABLE_TASKS(tsk) \ | 172 | INIT_PUSHABLE_TASKS(tsk) \ |
173 | INIT_CGROUP_SCHED(tsk) \ | ||
164 | .ptraced = LIST_HEAD_INIT(tsk.ptraced), \ | 174 | .ptraced = LIST_HEAD_INIT(tsk.ptraced), \ |
165 | .ptrace_entry = LIST_HEAD_INIT(tsk.ptrace_entry), \ | 175 | .ptrace_entry = LIST_HEAD_INIT(tsk.ptrace_entry), \ |
166 | .real_parent = &tsk, \ | 176 | .real_parent = &tsk, \ |
diff --git a/include/linux/sched.h b/include/linux/sched.h index 1a2ebd39b800..a721cef7e2d4 100644 --- a/include/linux/sched.h +++ b/include/linux/sched.h | |||
@@ -949,6 +949,7 @@ struct sched_domain { | |||
949 | unsigned int smt_gain; | 949 | unsigned int smt_gain; |
950 | int flags; /* See SD_* */ | 950 | int flags; /* See SD_* */ |
951 | int level; | 951 | int level; |
952 | int idle_buddy; /* cpu assigned to select_idle_sibling() */ | ||
952 | 953 | ||
953 | /* Runtime fields. */ | 954 | /* Runtime fields. */ |
954 | unsigned long last_balance; /* init to jiffies. units in jiffies */ | 955 | unsigned long last_balance; /* init to jiffies. units in jiffies */ |
@@ -1244,6 +1245,9 @@ struct task_struct { | |||
1244 | const struct sched_class *sched_class; | 1245 | const struct sched_class *sched_class; |
1245 | struct sched_entity se; | 1246 | struct sched_entity se; |
1246 | struct sched_rt_entity rt; | 1247 | struct sched_rt_entity rt; |
1248 | #ifdef CONFIG_CGROUP_SCHED | ||
1249 | struct task_group *sched_task_group; | ||
1250 | #endif | ||
1247 | 1251 | ||
1248 | #ifdef CONFIG_PREEMPT_NOTIFIERS | 1252 | #ifdef CONFIG_PREEMPT_NOTIFIERS |
1249 | /* list of struct preempt_notifier: */ | 1253 | /* list of struct preempt_notifier: */ |
@@ -2721,7 +2725,7 @@ extern int sched_group_set_rt_period(struct task_group *tg, | |||
2721 | extern long sched_group_rt_period(struct task_group *tg); | 2725 | extern long sched_group_rt_period(struct task_group *tg); |
2722 | extern int sched_rt_can_attach(struct task_group *tg, struct task_struct *tsk); | 2726 | extern int sched_rt_can_attach(struct task_group *tg, struct task_struct *tsk); |
2723 | #endif | 2727 | #endif |
2724 | #endif | 2728 | #endif /* CONFIG_CGROUP_SCHED */ |
2725 | 2729 | ||
2726 | extern int task_can_switch_user(struct user_struct *up, | 2730 | extern int task_can_switch_user(struct user_struct *up, |
2727 | struct task_struct *tsk); | 2731 | struct task_struct *tsk); |