Re: [PATCH 02/20 v3] sched/eevdf: Reset lag at wakeup when prev CPU has been idle
From: Vincent Guittot
Date: Mon Nov 09 2026 - 10:27:54 EST
On Fri, 6 Nov 2026 at 17:22, Kayra Cizmeci <kayracizmeci@xxxxxxxxx> wrote:
>
> On Fri, Nov 06, 2026 at 04:19:29PM +0100, Vincent Guittot wrote:
> > @@ -8376,6 +8383,9 @@ static bool __dequeue_task(struct rq *rq, struct task_struct *p, int flags)
> >
> > dequeue_hierarchy(p, flags);
> >
> > + if (!(flags & DEQUEUE_SAVE) && !cfs_rq->h_nr_queued)
> > + cfs_rq->idle_seq++;
>
> This needs WRITE_ONCE, no? 3/20 uses READ_ONCE().
I hesistated to make it WRITE_ONCE but i concluded that it was not
strictly necessary because the READ_ONCE is only used to compare the
value but not use it for any computation or sync so if the compiler
wants to do any kind of optimization what we really care is : is it
equal or not ? so any intermediate value that we would read would be
ok
>
>
> Cheers,
>
> Kayra
>