[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20240425102516.GD21980@noisy.programming.kicks-ass.net>
Date: Thu, 25 Apr 2024 12:25:16 +0200
From: Peter Zijlstra <peterz@...radead.org>
To: Yan-Jie Wang <yanjiewtw@...il.com>
Cc: Chen Yu <yu.c.chen@...el.com>, mingo@...hat.com, juri.lelli@...hat.com,
vincent.guittot@...aro.org, dietmar.eggemann@....com,
rostedt@...dmis.org, bsegall@...gle.com, mgorman@...e.de,
bristot@...hat.com, vschneid@...hat.com,
linux-kernel@...r.kernel.org, kprateek.nayak@....com,
wuyun.abel@...edance.com, tglx@...utronix.de, efault@....de,
yu.chen.surf@...il.com
Subject: Re: [RFC][PATCH 08/10] sched/fair: Implement delayed dequeue
On Thu, Apr 11, 2024 at 09:32:23AM +0800, Yan-Jie Wang wrote:
> I have an alternative approach to delayed-dequeue inspired by the original
> CFS implementation.
>
> The idea is to keep the task's vruntime when it goes to sleep.
> When the task is woken up, see if the lag is positive at the woken time, if
> it is the case, clamp it to 0 by setting vruntime to avg_vruntime().
Problem is that avg_vruntime() can go backwards, eg by dequeueing a
negative lag task. This gets really hard to argue about real quick.
Keeping the task competing (delaying the dequeue) is by far the simplest
solution -- conceptually.
The code just became a total mess because of cgroups :/
Powered by blists - more mailing lists