Re: [RFC PATCH 2/3] sched: add yield_to function

Peter Zijlstra
2010-12-08T20:05:18Z

On Wed, 2010-12-08 at 21:00 +0100, Peter Zijlstra wrote:
> + lag0 = avg_vruntime(cfs_rq_of(se));
> + p_lag0 = avg_vruntime(cfs_rq_of(p_se));
> +
> + lag = se->vruntime - avg_vruntime(cfs_rq);
> + p_lag = p_se->vruntime - avg_vruntime(p_cfs_rq);
> +
> + if (p_lag > lag) { /* if P is owed less service */
> + se->vruntime = lag0 + p_lag;
> + p_se->vruntime = p_lag + lag;
> + }

clearly that should read:

p_se->vruntime = p_lag0 + lag;