lkml.org 
[lkml]   [2024]   [Mar]   [6]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
SubjectRe: [PATCH v2 1/2] sched/eevdf: Always update V if se->on_rq when reweighting
From
On 3/6/24 10:21 AM, Tianchen Ding Wrote:
> reweight_eevdf() needs the latest V to do accurate calculation for new
> ve and vd. So update V unconditionally when se is runnable.
>
> Fixes: eab03c23c2a1 ("sched/eevdf: Fix vruntime adjustment on reweight")
> Suggested-by: Abel Wu <wuyun.abel@bytedance.com>
> Signed-off-by: Tianchen Ding <dtcccc@linux.alibaba.com>
> ---
> kernel/sched/fair.c | 5 ++---
> 1 file changed, 2 insertions(+), 3 deletions(-)
>
> diff --git a/kernel/sched/fair.c b/kernel/sched/fair.c
> index 03be0d1330a6..5551ce2af73e 100644
> --- a/kernel/sched/fair.c
> +++ b/kernel/sched/fair.c
> @@ -3790,9 +3790,8 @@ static void reweight_entity(struct cfs_rq *cfs_rq, struct sched_entity *se,
>
> if (se->on_rq) {
> /* commit outstanding execution time */
> - if (curr)
> - update_curr(cfs_rq);
> - else
> + update_curr(cfs_rq);
> + if (!curr)
> __dequeue_entity(cfs_rq, se);
> update_load_sub(&cfs_rq->load, se->load.weight);
> }

Reviewed-by: Abel Wu <wuyun.abel@bytedance.com>

Thanks!

\
 
 \ /
  Last update: 2024-05-27 15:37    [W:0.411 / U:0.240 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site