Re: [PATCH v7 05/14] sched: Introduce a sched_feat for Energy Aware Scheduling

From: Peter Zijlstra
Date: Wed Oct 03 2018 - 12:25:28 EST


On Tue, Oct 02, 2018 at 02:08:21PM +0100, Quentin Perret wrote:
> On Tuesday 02 Oct 2018 at 14:34:16 (+0200), Peter Zijlstra wrote:

> > So these are debug knobs.. I would expect there to be a regular
> > static_key that is controlled by the presence of EM data.
>
> Right, the issue I'm trying to solve with this is basically that _some_
> users will want to have an EM for the thermal stuff, but they will want
> EAS disabled. Some people (not very many that's true, but still) use
> big.little and don't care much about energy ...
>
> So, there is a need for an EAS knob on the scheduler side. I don't mind
> it being something else than a sched_feat, but I couldn't see a better
> option. Another Kconfig (CONFIG_SCHED_ENERGY) ? A sysctl ?

Yeah, sysctl, see for example: sysctl.kernel.numa_balancing and the
sched_numa_balancing static_key that goes with it.

I would default enable EAS if the EM is there and valid, but allow
people to disable it.