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 <[email protected]>
Acked-by: Steven Rostedt <[email protected]>
Acked-by: Gregory Haskins <[email protected]>
Signed-off-by: Peter Zijlstra <[email protected]>
LKML-Reference: <1291143093.2697.298.camel@Palantir>
Signed-off-by: Ingo Molnar <[email protected]>
This commit is contained in:
Dario Faggioli 2010-11-30 19:51:33 +01:00 • committed by Ingo Molnar
commit 806c09a7db
3 changed files with 12 additions and 1 deletions

View file

@ -2595,7 +2595,9 @@ void sched_fork(struct task_struct *p, int clone_flags)
/* Want to start with kernel preemption disabled. */
task_thread_info(p)->preempt_count = 1;
#endif
#ifdef CONFIG_SMP
plist_node_init(&p->pushable_tasks, MAX_PRIO);
#endif
put_cpu();
}