Re: [RFC 8/8] Do not reclaim the whole CPU bandwidth

From: Peter Zijlstra
Date: Fri Jan 15 2016 - 03:50:19 EST


On Fri, Jan 15, 2016 at 09:21:17AM +0100, Luca Abeni wrote:
> On 01/14/2016 08:59 PM, Peter Zijlstra wrote:
> >On Thu, Jan 14, 2016 at 04:24:53PM +0100, Luca Abeni wrote:
> >>Original GRUB tends to reclaim 100% of the CPU time... And this allows a
> >>"CPU hog" (i.e., a busy loop) to starve non-deadline tasks.
> >>To address this issue, allow the scheduler to reclaim only a specified
> >>fraction of CPU time.
> >>NOTE: the fraction of CPU time that cannot be reclaimed is currently
> >>hardcoded as (1 << 20) / 10 -> 90%, but it must be made configurable!
> >
> >So the alternative is an explicit SCHED_OTHER server which is
> >configurable.
> Yes, I have thought about something similar (actually, this is the strategy
> I implemented in my first CBS/GRUB scheduler. With the "old" 2.4 scheduler,
> this was easier :).
> But I think the solution I implemented in this patch is much simpler (it
> just requires a very simple modification to grub_reclaim()) and is more
> elegant from the theoretical point of view.

It is certainly simpler, agreed.

The trouble is with interfaces. Once we expose them we're stuck with
them. And from that POV I think an explicit SCHED_OTHER server (or a
minimum budget for a slack time scheme) makes more sense.

It provides this same information while also providing more benefit, no?

> >That would maybe fit in nicely with the DL based FIFO/RR servers from
> >this other pending project.
> Yes, this reminds me about the half-finished patch for RT throttling using
> SCHED_DEADLINE... But that patch needs much more work IMHO.

IIRC two years ago at RTLWS there was a presentation that the SMP issues
were 'solved' and they would be posting the patches 'soon'.