Re: [PATCH v4 2/5] sched: Record the current active power savingslevel

From: Gautham R Shenoy
Date: Tue Aug 25 2009 - 05:12:37 EST

On Mon, Aug 24, 2009 at 06:09:25PM +0200, Peter Zijlstra wrote:
> On Tue, 2009-03-31 at 16:20 +0530, Gautham R Shenoy wrote:
> > The existing load balancer code is dependent on the sched_mc_power_savings
> > variable. However, on multi-core + multi-threaded machines, these decisions
> > need to be dependent on the values of both sched_mc_power_savings and
> > sched_smt_power_savings.
> >
> > Create a new variable named active_power_savings_level which is the
> > maximum of the sched_mc_power_savings and sched_smt_power_savings.
> >
> > Record this value in a read mostly global variable at the time when the user
> > changes the value of sched_mc/smt_power_savings tunable, and use it for
> > load-balancing decisions instead of computing it everytime.
> OK, so why keep these variables separate at all?

The power-savings load-balancing in the scheduler depends on two things.
1) The domain at which we want to perform power-aware load balance.

2) The aggressiveness with which we want to perfomr power-aware

The variables were kept seperate for 1) since a non-zero value at
sched_smt_power_savings would indicate that we want to perform
power-aware load balancing at level SD_LV_MC and a non-zero value of
sched_mc_power_savings would indicate that we want to perform
power-aware load balancing at level SD_LV_CPU.

However, if we can agree to do away with these multiple
sched_*_power_savings sysfs variables, and come up with a single tunable
with a reasonable set of values that can map to all relavent
combinations of power-aware-load balancing at the different energy
domains (cache-level, chip-level, node-level), then we can do away with
these separate variables.

Thanks and Regards
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at
Please read the FAQ at