[lkml]   [2019]   [Jul]   [30]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: [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.
[unhandled content-type:application/pgp-signature]
 \ /
  Last update: 2019-07-30 20:28    [W:0.226 / U:1.960 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site