Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 135675
b: refs/heads/master
c: 7e96fa5
h: refs/heads/master
i:
  135673: dbdca65
  135671: ac47e73
v: v3
  • Loading branch information
Gregory Haskins committed Dec 29, 2008
1 parent 8d058cc commit 8733403
Show file tree
Hide file tree
Showing 2 changed files with 18 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: 777c2f389e463428fd7e2871051a84d7fe84b172
refs/heads/master: 7e96fa5875d4a9be18d74d3ca7b90518d05bc426
18 changes: 17 additions & 1 deletion trunk/kernel/sched.c
Original file line number Diff line number Diff line change
Expand Up @@ -2984,6 +2984,16 @@ balance_tasks(struct rq *this_rq, int this_cpu, struct rq *busiest,
pulled++;
rem_load_move -= p->se.load.weight;

#ifdef CONFIG_PREEMPT
/*
* NEWIDLE balancing is a source of latency, so preemptible kernels
* will stop after the first task is pulled to minimize the critical
* section.
*/
if (idle == CPU_NEWLY_IDLE)
goto out;
#endif

/*
* We only want to steal up to the prescribed amount of weighted load.
*/
Expand Down Expand Up @@ -3030,9 +3040,15 @@ static int move_tasks(struct rq *this_rq, int this_cpu, struct rq *busiest,
sd, idle, all_pinned, &this_best_prio);
class = class->next;

#ifdef CONFIG_PREEMPT
/*
* NEWIDLE balancing is a source of latency, so preemptible
* kernels will stop after the first task is pulled to minimize
* the critical section.
*/
if (idle == CPU_NEWLY_IDLE && this_rq->nr_running)
break;

#endif
} while (class && max_load_move > total_load_moved);

return total_load_moved > 0;
Expand Down

0 comments on commit 8733403

Please sign in to comment.