aboutsummaryrefslogtreecommitdiffstats
path: root/kernel
diff options
context:
space:
mode:
authorPeter Zijlstra <a.p.zijlstra@chello.nl>2007-10-15 11:00:18 -0400
committerIngo Molnar <mingo@elte.hu>2007-10-15 11:00:18 -0400
commitff56b2f01537aef7237d5ac8bf6bfbb409c1a127 (patch)
tree52f7a687f8d3e15b17dc8e6a1789cc537e87d6c8 /kernel
parentda84d96176729fb48a8458561e5d8647103168b8 (diff)
sched: activate task_hot() only on fair-scheduled tasks
activate task_hot() only for fair-scheduled tasks (i.e. disable it for RT tasks). Signed-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl> Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'kernel')
-rw-r--r--kernel/sched.c11
1 files changed, 8 insertions, 3 deletions
diff --git a/kernel/sched.c b/kernel/sched.c
index 089d8b12ab76..945ab1322e18 100644
--- a/kernel/sched.c
+++ b/kernel/sched.c
@@ -2122,11 +2122,16 @@ static void pull_task(struct rq *src_rq, struct task_struct *p,
2122 * Is this task likely cache-hot: 2122 * Is this task likely cache-hot:
2123 */ 2123 */
2124static inline int 2124static inline int
2125task_hot(struct task_struct *p, unsigned long long now, struct sched_domain *sd) 2125task_hot(struct task_struct *p, u64 now, struct sched_domain *sd)
2126{ 2126{
2127 s64 delta = now - p->se.exec_start; 2127 s64 delta;
2128 2128
2129 return delta < (long long)sysctl_sched_migration_cost; 2129 if (p->sched_class != &fair_sched_class)
2130 return 0;
2131
2132 delta = now - p->se.exec_start;
2133
2134 return delta < (s64)sysctl_sched_migration_cost;
2130} 2135}
2131 2136
2132/* 2137/*