Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 108203
b: refs/heads/master
c: 77ae651
h: refs/heads/master
i:
  108201: 6c6c885
  108199: 26f7351
v: v3
  • Loading branch information
Mike Galbraith authored and Ingo Molnar committed Aug 11, 2008
1 parent ebf71cd commit 443bc9a
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 8 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: 251a169c69d1ff07cee7a9bb9fc4faff6b1d2ac3
refs/heads/master: 77ae651347bdd46830da8b28b1efc5e4a9d7cbd0
19 changes: 12 additions & 7 deletions trunk/kernel/sched_fair.c
Original file line number Diff line number Diff line change
Expand Up @@ -1442,18 +1442,23 @@ __load_balance_iterator(struct cfs_rq *cfs_rq, struct list_head *next)
struct task_struct *p = NULL;
struct sched_entity *se;

while (next != &cfs_rq->tasks) {
if (next == &cfs_rq->tasks)
return NULL;

/* Skip over entities that are not tasks */
do {
se = list_entry(next, struct sched_entity, group_node);
next = next->next;
} while (next != &cfs_rq->tasks && !entity_is_task(se));

/* Skip over entities that are not tasks */
if (entity_is_task(se)) {
p = task_of(se);
break;
}
}
if (next == &cfs_rq->tasks)
return NULL;

cfs_rq->balance_iterator = next;

if (entity_is_task(se))
p = task_of(se);

return p;
}

Expand Down

0 comments on commit 443bc9a

Please sign in to comment.