[PATCH] sched: fair: simplify can_migrate_task a bit

From: Sasha Levin
Date: Thu Dec 20 2012 - 14:14:33 EST


We already know that tsk_cache_hot is true at the end of
can_migrate_task, no need to double check that.

Signed-off-by: Sasha Levin <sasha.levin@xxxxxxxxxx>
---
kernel/sched/fair.c | 7 ++-----
1 file changed, 2 insertions(+), 5 deletions(-)

diff --git a/kernel/sched/fair.c b/kernel/sched/fair.c
index 4603d6c..e03940e0 100644
--- a/kernel/sched/fair.c
+++ b/kernel/sched/fair.c
@@ -3935,11 +3935,8 @@ int can_migrate_task(struct task_struct *p, struct lb_env *env)
return 1;
}

- if (tsk_cache_hot) {
- schedstat_inc(p, se.statistics.nr_failed_migrations_hot);
- return 0;
- }
- return 1;
+ schedstat_inc(p, se.statistics.nr_failed_migrations_hot);
+ return 0;
}

/*
--
1.8.0

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/