Re: [RFC 8/8] Do not reclaim the whole CPU bandwidth
From: Luca Abeni
Date: Tue Feb 02 2016 - 15:53:34 EST
On Wed, 27 Jan 2016 15:44:22 +0100
Peter Zijlstra <peterz@xxxxxxxxxxxxx> wrote:
> On Tue, Jan 26, 2016 at 01:52:19PM +0100, luca abeni wrote:
>
> > > 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.
>
> > I am trying to work on this.
> > Which kind of interface is better for this? Would adding something
> > like /proc/sys/kernel/sched_other_period_us
> > /proc/sys/kernel/sched_other_runtime_us
> > be ok?
> >
> > If this is ok, I'll add these two procfs files, and store
> > (sched_other_runtime / sched_other_period) << 20 in the runqueue
> > field which represents the unreclaimable utilization (implementing
> > hierarchical SCHED_DEADLINE/CFS scheduling right now is too complex
> > for this patchset... But if the exported interface is ok, it can be
> > implemented later).
> >
> > Is this approach acceptable? Or am I misunderstanding your comment?
>
> No, I think that's fine.
So, I implemented this idea (/proc/sys/kernel/sched_other_period_us
and /proc/sys/kernel/sched_other_runtime_us to set the unreclaimable
utilization), and some initial testing seems to show that it works fine.
However, after double-thinking about it I am wondering if using a
runqueue field to store the unreclaimable utilization (unusable_bw in my
original patch) makes sense or not... This value is the same for all
the runqueue, and changing sched_other_runtime/sched_other_period
changes the unreclaimable utilization on all the runqueues... So maybe
it is better to use a global variable instead of a runqueue field?
Any ideas / suggestions? Before sending a v2 of the RFC, I'd like to
be sure that I am doing the right thing.
Thanks,
Luca