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/init_task.h | |
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/init_task.h')
-rw-r--r-- | include/linux/init_task.h | 9 |
1 files changed, 8 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, \ |