Re: [PATCHSET v6] sched: Implement BPF extensible scheduler class

Rik van Riel
2024-05-07T19:49:11Z

On Tue, 2024-05-07 at 09:33 -1000, Tejun Heo wrote:
> On Mon, May 06, 2024 at 02:47:47PM -0400, Rik van Riel wrote:
>
>
> >    I believe this can be solved with the same idea I had for
> >    reimplementing CONFIG_CFS_BANDWIDTH. Specifically, the code that
> >    determines the time slice length for a task already has a way to
> >    determine whether a CPU is "overloaded", and time slices need to
> > be
> >    shortened. Once we reach that situation, we can place woken up
> > tasks on
> >    a secondary heap of per-cgroup runqueues, from which we do not
> > directly
> >    run tasks, but pick the lowest vruntime task from the lowest
> > vruntime
> >    cgroup and put that on the main runqueue, if the previously
> > running
>
> When overloaded, are the cgroups being put on a single rbtree? If so,
> they'd
> be using flattened shares, right? I wonder what you're suggesting for
> the
> overloaded case is pretty simliar to what flatcg is doing plus
> avoiding one
> level of indirection while not overloaded.

It does indeed sound like flatcg is doing almost the same thing.

I'm not entirely sure what to make of the fact that we both
came up with the same solution to the problem. I suppose it's
a nice improvement over a fully hierarchical solution, especially
when it comes to overhead, but there is still a fair amount of
complexity left.

I don't know if there is a simpler solution to this problem.

There might not be.

--
All Rights Reversed.