Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 30795
b: refs/heads/master
c: 50ddd96
h: refs/heads/master
i:
  30793: 4a1ed87
  30791: 8d425b7
v: v3
  • Loading branch information
Peter Williams authored and Linus Torvalds committed Jun 28, 2006
1 parent 538df47 commit 0b6dc49
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 3 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: 2dd73a4f09beacadde827a032cf15fd8b1fa3d48
refs/heads/master: 50ddd96917e4548b3813bfb5dd6f97f052b652bd
12 changes: 10 additions & 2 deletions trunk/kernel/sched.c
Original file line number Diff line number Diff line change
Expand Up @@ -1955,7 +1955,7 @@ static int move_tasks(runqueue_t *this_rq, int this_cpu, runqueue_t *busiest,
{
prio_array_t *array, *dst_array;
struct list_head *head, *curr;
int idx, pulled = 0, pinned = 0;
int idx, pulled = 0, pinned = 0, this_min_prio;
long rem_load_move;
task_t *tmp;

Expand All @@ -1964,6 +1964,7 @@ static int move_tasks(runqueue_t *this_rq, int this_cpu, runqueue_t *busiest,

rem_load_move = max_load_move;
pinned = 1;
this_min_prio = this_rq->curr->prio;

/*
* We first consider expired tasks. Those will likely not be
Expand Down Expand Up @@ -2003,7 +2004,12 @@ static int move_tasks(runqueue_t *this_rq, int this_cpu, runqueue_t *busiest,

curr = curr->prev;

if (tmp->load_weight > rem_load_move ||
/*
* To help distribute high priority tasks accross CPUs we don't
* skip a task if it will be the highest priority task (i.e. smallest
* prio value) on its new queue regardless of its load weight
*/
if ((idx >= this_min_prio && tmp->load_weight > rem_load_move) ||
!can_migrate_task(tmp, busiest, this_cpu, sd, idle, &pinned)) {
if (curr != head)
goto skip_queue;
Expand All @@ -2025,6 +2031,8 @@ static int move_tasks(runqueue_t *this_rq, int this_cpu, runqueue_t *busiest,
* and the prescribed amount of weighted load.
*/
if (pulled < max_nr_move && rem_load_move > 0) {
if (idx < this_min_prio)
this_min_prio = idx;
if (curr != head)
goto skip_queue;
idx++;
Expand Down

0 comments on commit 0b6dc49

Please sign in to comment.