Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 69130
b: refs/heads/master
c: 6bc1665
h: refs/heads/master
v: v3
  • Loading branch information
Ingo Molnar committed Oct 15, 2007
1 parent e21be33 commit 1d3ae3b
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: cc367732ff0b1c63d0d7bdd11e6d1661794ef6a3
refs/heads/master: 6bc1665ba71de0f207391b01b187b21b2619c15c
8 changes: 7 additions & 1 deletion trunk/kernel/sched.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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]);
Expand Down

0 comments on commit 1d3ae3b

Please sign in to comment.