|
@@ -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
|
|
|
}
|
|
|
|
|
|
/*
|
|
@@ -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
|