[PATCH 4/4] sched: make task_hot() once again use sd->cache_hot_time

From: Gregory Haskins
Date: Thu Sep 04 2008 - 09:54:01 EST


Signed-off-by: Gregory Haskins <ghaskins@xxxxxxxxxx>
---

kernel/sched.c | 8 ++------
1 files changed, 2 insertions(+), 6 deletions(-)

diff --git a/kernel/sched.c b/kernel/sched.c
index fd28b64..b5f8640 100644
--- a/kernel/sched.c
+++ b/kernel/sched.c
@@ -1778,6 +1778,7 @@ static int
task_hot(struct task_struct *p, u64 now, struct sched_domain *sd)
{
s64 delta;
+ s64 migration_cost = (s64)(sd ? sd->cache_hot_time : sysctl_sched_migration_cost);

/*
* Buddy candidates are cache hot:
@@ -1788,14 +1789,9 @@ task_hot(struct task_struct *p, u64 now, struct sched_domain *sd)
if (p->sched_class != &fair_sched_class)
return 0;

- if (sysctl_sched_migration_cost == -1)
- return 1;
- if (sysctl_sched_migration_cost == 0)
- return 0;
-
delta = now - p->se.exec_start;

- return delta < (s64)sysctl_sched_migration_cost;
+ return delta < migration_cost;
}



--
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/