lkml.org 
[lkml]   [2019]   [Jul]   [30]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [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.


\
 
 \ /
  Last update: 2019-07-30 18:30    [W:0.231 / U:4.676 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site