[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20260202091234.GA1395416@noisy.programming.kicks-ass.net>
Date: Mon, 2 Feb 2026 10:12:34 +0100
From: Peter Zijlstra <peterz@...radead.org>
To: Zhang Qiao <zhangqiao22@...wei.com>
Cc: mingo@...nel.org, juri.lelli@...hat.com, vincent.guittot@...aro.org,
dietmar.eggemann@....com, rostedt@...dmis.org, bsegall@...gle.com,
mgorman@...e.de, vschneid@...hat.com, linux-kernel@...r.kernel.org,
wangtao554@...wei.com, quzicheng@...wei.com, kprateek.nayak@....com,
wuyun.abel@...edance.com, dsmythies@...us.net,
Hui Tang <tanghui20@...wei.com>
Subject: Re: [PATCH 4/4] sched/fair: Revert 6d71a9c61604 ("sched/fair: Fix
EEVDF entity placement bug causing scheduling lag")
On Sat, Jan 31, 2026 at 04:21:39PM +0100, Peter Zijlstra wrote:
> On Sat, Jan 31, 2026 at 09:47:07AM +0800, Zhang Qiao wrote:
>
> > > if (se->on_rq) {
> > > /* commit outstanding execution time */
> > > update_curr(cfs_rq);
> > > - update_entity_lag(cfs_rq, se);
> > > - se->deadline -= se->vruntime;
> > > + avruntime = avg_vruntime(cfs_rq);
> > > + se->vlag = entity_lag(avruntime, se);
> >
> >
> > vlag is updated here. Considering vlag and vprot share the same union, updating
> > vlag will overwrite vprot. Is it right to call protect_slice() (which use vprot)
> > after this update?
>
> Oh you are quite right; I'm sure Ingo had a patch removing that union,
> but clearly that's not been merged yet.
>
> Sorry about that mistake; I'll make a new version on Monday.
After looking at things, I think the best option is to simply remove
that union.
The thing is, I can fix reweight to respect this union, but there are
more problems, notably the sched_change pattern will not only call
put_prev_task/set_next_task, it will actually dequeue/enqueue the thing
and therefore 'temporarily' use the vlag field, destroying the vprot
value.
And yes, we can fix all that, but I'm thinking that at that point the
union is more trouble than its worth.
Powered by blists - more mailing lists