sched: move weighted_cpuload into #ifdef CONFIG_SMP section
weighted_cpuload is only used on SMP. move it into the CONFIG_SMP section. Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
This commit is contained in:
committed by
Ingo Molnar
parent
68f4f1ec08
commit
e958b36004
@@ -1637,12 +1637,6 @@ inline int task_curr(const struct task_struct *p)
|
|||||||
return cpu_curr(task_cpu(p)) == p;
|
return cpu_curr(task_cpu(p)) == p;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Used instead of source_load when we know the type == 0 */
|
|
||||||
static unsigned long weighted_cpuload(const int cpu)
|
|
||||||
{
|
|
||||||
return cpu_rq(cpu)->load.weight;
|
|
||||||
}
|
|
||||||
|
|
||||||
static inline void __set_task_cpu(struct task_struct *p, unsigned int cpu)
|
static inline void __set_task_cpu(struct task_struct *p, unsigned int cpu)
|
||||||
{
|
{
|
||||||
set_task_rq(p, cpu);
|
set_task_rq(p, cpu);
|
||||||
@@ -1671,6 +1665,12 @@ static inline void check_class_changed(struct rq *rq, struct task_struct *p,
|
|||||||
|
|
||||||
#ifdef CONFIG_SMP
|
#ifdef CONFIG_SMP
|
||||||
|
|
||||||
|
/* Used instead of source_load when we know the type == 0 */
|
||||||
|
static unsigned long weighted_cpuload(const int cpu)
|
||||||
|
{
|
||||||
|
return cpu_rq(cpu)->load.weight;
|
||||||
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Is this task likely cache-hot:
|
* Is this task likely cache-hot:
|
||||||
*/
|
*/
|
||||||
|
Reference in New Issue
Block a user