[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20190730162933.GW31398@hirez.programming.kicks-ass.net>
Date: Tue, 30 Jul 2019 18:29:33 +0200
From: Peter Zijlstra <peterz@...radead.org>
To: Rik van Riel <riel@...riel.com>
Cc: linux-kernel@...r.kernel.org, kernel-team@...com, pjt@...gle.com,
dietmar.eggemann@....com, mingo@...hat.com,
morten.rasmussen@....com, tglx@...utronix.de,
mgorman@...hsingularity.net, vincent.guittot@...aro.org
Subject: Re: [PATCH RFC v3 0/14] sched,fair: flatten CPU controller runqueues
On Mon, Jul 22, 2019 at 01:33:34PM -0400, Rik van Riel wrote:
> Plan for the CONFIG_CFS_BANDWIDTH reimplementation:
> - When a cgroup gets throttled, mark the cgroup and its children
> as throttled.
> - When pick_next_entity finds a task that is on a throttled cgroup,
> stash it on the cgroup runqueue (which is not used for runnable
> tasks any more). Leave the vruntime unchanged, and adjust that
> runqueue's vruntime to be that of the left-most task.
and ignore such tasks for the load-balancer; I suppose
> - When a cgroup gets unthrottled, and has tasks on it, place it on
> a vruntime ordered heap separate from the main runqueue.
and expose said heap to the load-balancer..
Now, I suppose you do this because merging heaps is easier than merging
RB trees? (not in complexity iirc, but probably in code)
> - Have pick_next_task_fair grab one task off that heap every time it
> is called, and the min vruntime of that heap is lower than the
> vruntime of the CPU's cfs_rq (or the CPU has no other runnable tasks).
That's like a smeared out merge :-) But since the other tasks kept on
running, this CPUs vruntime will be (much) advanced vs those throttled
tasks and we'll most likely end up picking them all before we pick a
'normal' task.
> - Place that selected task on the CPU's cfs_rq, renormalizing its
> vruntime with the GENTLE_FAIR_SLEEPERS logic. That should help
> interleave the already runnable tasks with the recently unthrottled
> group, and prevent thundering herd issues.
> - If the group gets throttled again before all of its task had a chance
> to run, vruntime sorting ensures all the tasks in the throttled cgroup
> get a chance to run over time.
Powered by blists - more mailing lists