diff options
author | Dario Faggioli <raistlin@linux.it> | 2010-11-30 13:51:33 -0500 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2010-12-08 14:16:00 -0500 |
commit | 806c09a7db457be3758e14b1f152761135d89af5 (patch) | |
tree | b0fafff45634be80f3caf7227c5d47317f26e0e9 /include/linux | |
parent | 8e9255e6a2141e050d51bc4d96dbef494a87d653 (diff) |
sched: Make pushable_tasks CONFIG_SMP dependant
As noted by Peter Zijlstra at https://lkml.org/lkml/2010/11/10/391
(while reviewing other stuff, though), tracking pushable tasks
only makes sense on SMP systems.
Signed-off-by: Dario Faggioli <raistlin@linux.it>
Acked-by: Steven Rostedt <rostedt@goodmis.org>
Acked-by: Gregory Haskins <ghaskins@novell.com>
Signed-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
LKML-Reference: <1291143093.2697.298.camel@Palantir>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'include/linux')
-rw-r--r-- | include/linux/init_task.h | 9 | ||||
-rw-r--r-- | include/linux/sched.h | 2 |
2 files changed, 10 insertions, 1 deletions
diff --git a/include/linux/init_task.h b/include/linux/init_task.h index 1f8c06ce0fa6..6ed8812bfe2d 100644 --- a/include/linux/init_task.h +++ b/include/linux/init_task.h | |||
@@ -12,6 +12,13 @@ | |||
12 | #include <linux/securebits.h> | 12 | #include <linux/securebits.h> |
13 | #include <net/net_namespace.h> | 13 | #include <net/net_namespace.h> |
14 | 14 | ||
15 | #ifdef CONFIG_SMP | ||
16 | # define INIT_PUSHABLE_TASKS(tsk) \ | ||
17 | .pushable_tasks = PLIST_NODE_INIT(tsk.pushable_tasks, MAX_PRIO), | ||
18 | #else | ||
19 | # define INIT_PUSHABLE_TASKS(tsk) | ||
20 | #endif | ||
21 | |||
15 | extern struct files_struct init_files; | 22 | extern struct files_struct init_files; |
16 | extern struct fs_struct init_fs; | 23 | extern struct fs_struct init_fs; |
17 | 24 | ||
@@ -137,7 +144,7 @@ extern struct cred init_cred; | |||
137 | .nr_cpus_allowed = NR_CPUS, \ | 144 | .nr_cpus_allowed = NR_CPUS, \ |
138 | }, \ | 145 | }, \ |
139 | .tasks = LIST_HEAD_INIT(tsk.tasks), \ | 146 | .tasks = LIST_HEAD_INIT(tsk.tasks), \ |
140 | .pushable_tasks = PLIST_NODE_INIT(tsk.pushable_tasks, MAX_PRIO), \ | 147 | INIT_PUSHABLE_TASKS(tsk) \ |
141 | .ptraced = LIST_HEAD_INIT(tsk.ptraced), \ | 148 | .ptraced = LIST_HEAD_INIT(tsk.ptraced), \ |
142 | .ptrace_entry = LIST_HEAD_INIT(tsk.ptrace_entry), \ | 149 | .ptrace_entry = LIST_HEAD_INIT(tsk.ptrace_entry), \ |
143 | .real_parent = &tsk, \ | 150 | .real_parent = &tsk, \ |
diff --git a/include/linux/sched.h b/include/linux/sched.h index 9c2d46da486e..4f92a239c14d 100644 --- a/include/linux/sched.h +++ b/include/linux/sched.h | |||
@@ -1240,7 +1240,9 @@ struct task_struct { | |||
1240 | #endif | 1240 | #endif |
1241 | 1241 | ||
1242 | struct list_head tasks; | 1242 | struct list_head tasks; |
1243 | #ifdef CONFIG_SMP | ||
1243 | struct plist_node pushable_tasks; | 1244 | struct plist_node pushable_tasks; |
1245 | #endif | ||
1244 | 1246 | ||
1245 | struct mm_struct *mm, *active_mm; | 1247 | struct mm_struct *mm, *active_mm; |
1246 | #if defined(SPLIT_RSS_COUNTING) | 1248 | #if defined(SPLIT_RSS_COUNTING) |