Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 245579
b: refs/heads/master
c: 3fe1698
h: refs/heads/master
i:
  245577: fad145c
  245575: 8110da3
v: v3
  • Loading branch information
Peter Zijlstra authored and Ingo Molnar committed Apr 14, 2011
1 parent 4350c78 commit 3b40d2c
Show file tree
Hide file tree
Showing 3 changed files with 21 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: 74f8e4b2335de45485b8d5b31a504747f13c8070
refs/heads/master: 3fe1698b7fe05aeb063564e71e40d09f28d8e80c
3 changes: 3 additions & 0 deletions trunk/kernel/sched.c
Original file line number Diff line number Diff line change
Expand Up @@ -312,6 +312,9 @@ struct cfs_rq {

u64 exec_clock;
u64 min_vruntime;
#ifndef CONFIG_64BIT
u64 min_vruntime_copy;
#endif

struct rb_root tasks_timeline;
struct rb_node *rb_leftmost;
Expand Down
19 changes: 17 additions & 2 deletions trunk/kernel/sched_fair.c
Original file line number Diff line number Diff line change
Expand Up @@ -358,6 +358,10 @@ static void update_min_vruntime(struct cfs_rq *cfs_rq)
}

cfs_rq->min_vruntime = max_vruntime(cfs_rq->min_vruntime, vruntime);
#ifndef CONFIG_64BIT
smp_wmb();
cfs_rq->min_vruntime_copy = cfs_rq->min_vruntime;
#endif
}

/*
Expand Down Expand Up @@ -1376,10 +1380,21 @@ static void task_waking_fair(struct task_struct *p)
{
struct sched_entity *se = &p->se;
struct cfs_rq *cfs_rq = cfs_rq_of(se);
u64 min_vruntime;

lockdep_assert_held(&task_rq(p)->lock);
#ifndef CONFIG_64BIT
u64 min_vruntime_copy;

se->vruntime -= cfs_rq->min_vruntime;
do {
min_vruntime_copy = cfs_rq->min_vruntime_copy;
smp_rmb();
min_vruntime = cfs_rq->min_vruntime;
} while (min_vruntime != min_vruntime_copy);
#else
min_vruntime = cfs_rq->min_vruntime;
#endif

se->vruntime -= min_vruntime;
}

#ifdef CONFIG_FAIR_GROUP_SCHED
Expand Down

0 comments on commit 3b40d2c

Please sign in to comment.