Commit 1bf08230 authored by Andrei Epure's avatar Andrei Epure Committed by Ingo Molnar

sched: Fix variable name misnomer, add comments

The min_vruntime variable actually stores the maximum value.
The added comment was taken from place_entity function.
Signed-off-by: default avatarAndrei Epure <epure.andrei@gmail.com>
Cc: peterz@infradead.org
Link: http://lkml.kernel.org/r/1363115544-1964-1-git-send-email-epure.andrei@gmail.comSigned-off-by: default avatarIngo Molnar <mingo@kernel.org>
parent 660cc00f
...@@ -431,13 +431,13 @@ void account_cfs_rq_runtime(struct cfs_rq *cfs_rq, unsigned long delta_exec); ...@@ -431,13 +431,13 @@ void account_cfs_rq_runtime(struct cfs_rq *cfs_rq, unsigned long delta_exec);
* Scheduling class tree data structure manipulation methods: * Scheduling class tree data structure manipulation methods:
*/ */
static inline u64 max_vruntime(u64 min_vruntime, u64 vruntime) static inline u64 max_vruntime(u64 max_vruntime, u64 vruntime)
{ {
s64 delta = (s64)(vruntime - min_vruntime); s64 delta = (s64)(vruntime - max_vruntime);
if (delta > 0) if (delta > 0)
min_vruntime = vruntime; max_vruntime = vruntime;
return min_vruntime; return max_vruntime;
} }
static inline u64 min_vruntime(u64 min_vruntime, u64 vruntime) static inline u64 min_vruntime(u64 min_vruntime, u64 vruntime)
...@@ -473,6 +473,7 @@ static void update_min_vruntime(struct cfs_rq *cfs_rq) ...@@ -473,6 +473,7 @@ static void update_min_vruntime(struct cfs_rq *cfs_rq)
vruntime = min_vruntime(vruntime, se->vruntime); vruntime = min_vruntime(vruntime, se->vruntime);
} }
/* ensure we never gain time by being placed backwards. */
cfs_rq->min_vruntime = max_vruntime(cfs_rq->min_vruntime, vruntime); cfs_rq->min_vruntime = max_vruntime(cfs_rq->min_vruntime, vruntime);
#ifndef CONFIG_64BIT #ifndef CONFIG_64BIT
smp_wmb(); smp_wmb();
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment