Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 234549
b: refs/heads/master
c: 2c13c91
h: refs/heads/master
i:
  234547: cf17329
v: v3
  • Loading branch information
Rik van Riel authored and Ingo Molnar committed Feb 3, 2011
1 parent 7f6201e commit 3e3036d
Show file tree
Hide file tree
Showing 2 changed files with 24 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: 725e7580aaf98e9f7b22b8ccfc640ad0c09e2b08
refs/heads/master: 2c13c919d9e9a3db9896143a501f83dcbbe1ced4
30 changes: 23 additions & 7 deletions trunk/kernel/sched_fair.c
Original file line number Diff line number Diff line change
Expand Up @@ -995,19 +995,35 @@ enqueue_entity(struct cfs_rq *cfs_rq, struct sched_entity *se, int flags)
list_add_leaf_cfs_rq(cfs_rq);
}

static void __clear_buddies(struct cfs_rq *cfs_rq, struct sched_entity *se)
static void __clear_buddies_last(struct sched_entity *se)
{
if (!se || cfs_rq->last == se)
cfs_rq->last = NULL;
for_each_sched_entity(se) {
struct cfs_rq *cfs_rq = cfs_rq_of(se);
if (cfs_rq->last == se)
cfs_rq->last = NULL;
else
break;
}
}

if (!se || cfs_rq->next == se)
cfs_rq->next = NULL;
static void __clear_buddies_next(struct sched_entity *se)
{
for_each_sched_entity(se) {
struct cfs_rq *cfs_rq = cfs_rq_of(se);
if (cfs_rq->next == se)
cfs_rq->next = NULL;
else
break;
}
}

static void clear_buddies(struct cfs_rq *cfs_rq, struct sched_entity *se)
{
for_each_sched_entity(se)
__clear_buddies(cfs_rq_of(se), se);
if (cfs_rq->last == se)
__clear_buddies_last(se);

if (cfs_rq->next == se)
__clear_buddies_next(se);
}

static void
Expand Down

0 comments on commit 3e3036d

Please sign in to comment.