From: Peter Zijlstra Date: Mon, 15 Oct 2007 15:00:18 +0000 (+0200) Subject: sched: activate task_hot() only on fair-scheduled tasks X-Git-Tag: v2.6.24-rc1~1289^2~17 X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=ff56b2f01537aef7237d5ac8bf6bfbb409c1a127;p=linux-2.6 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 Signed-off-by: Ingo Molnar --- diff --git a/kernel/sched.c b/kernel/sched.c index 089d8b12ab..945ab1322e 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, * Is this task likely cache-hot: */ static inline int -task_hot(struct task_struct *p, unsigned long long now, struct sched_domain *sd) +task_hot(struct task_struct *p, u64 now, struct sched_domain *sd) { - s64 delta = now - p->se.exec_start; + s64 delta; - return delta < (long long)sysctl_sched_migration_cost; + if (p->sched_class != &fair_sched_class) + return 0; + + delta = now - p->se.exec_start; + + return delta < (s64)sysctl_sched_migration_cost; } /*