lkml.org 
[lkml]   [2012]   [Dec]   [20]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH] sched: fair: simplify can_migrate_task a bit
Date
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@oracle.com>
---
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


\
 
 \ /
  Last update: 2012-12-20 21:21    [W:0.238 / U:11.564 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site