[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <d38c5d5b5adfc9b9b4f386f912daa8c581ec6328.camel@surriel.com>
Date: Tue, 30 Jul 2019 14:27:22 -0400
From: Rik van Riel <riel@...riel.com>
To: Peter Zijlstra <peterz@...radead.org>
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 Tue, 2019-07-30 at 18:29 +0200, Peter Zijlstra wrote:
> 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
Good point. I suppose we need to find a lazy way of doing
this, too...
> > - 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.
The GENTLE_FAIR_SLEEPERS code should place the vruntime
of newly unthrottled tasks to the right of that of the
current top task on the runqueue, to prevent thundering
herd effects (and the throttled group immediately going
over its quota again, while causing bad latency for others).
> > - 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.
>
>
--
All Rights Reversed.
Download attachment "signature.asc" of type "application/pgp-signature" (489 bytes)
Powered by blists - more mailing lists