summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorIngo Molnar <mingo@elte.hu>2007-10-15 17:00:18 +0200
committerIngo Molnar <mingo@elte.hu>2007-10-15 17:00:18 +0200
commit6bc1665ba71de0f207391b01b187b21b2619c15c (patch)
treeefb135b9e389046a70816bb59df11bd265f93f53
parentcc367732ff0b1c63d0d7bdd11e6d1661794ef6a3 (diff)
downloadop-kernel-dev-6bc1665ba71de0f207391b01b187b21b2619c15c.zip
op-kernel-dev-6bc1665ba71de0f207391b01b187b21b2619c15c.tar.gz
sched: allow the immediate migration of cache-cold tasks
allow the immediate migration of cache-cold tasks. Signed-off-by: Ingo Molnar <mingo@elte.hu>
-rw-r--r--kernel/sched.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/kernel/sched.c b/kernel/sched.c
index 3b27c3a..7506127 100644
--- a/kernel/sched.c
+++ b/kernel/sched.c
@@ -1016,6 +1016,11 @@ 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;
@@ -2189,7 +2194,8 @@ int can_migrate_task(struct task_struct *p, struct rq *rq, int this_cpu,
* 2) too many balance attempts have failed.
*/
- if (sd->nr_balance_failed > sd->cache_nice_tries) {
+ if (!task_hot(p, rq->clock, sd) ||
+ sd->nr_balance_failed > sd->cache_nice_tries) {
#ifdef CONFIG_SCHEDSTATS
if (task_hot(p, rq->clock, sd)) {
schedstat_inc(sd, lb_hot_gained[idle]);
OpenPOWER on IntegriCloud