Re: [discussion]sched: a rough proposal to enable power saving inscheduler

From: Ingo Molnar
Date: Tue Aug 21 2012 - 05:42:07 EST



* Matthew Garrett <mjg59@xxxxxxxxxxxxx> wrote:

> On Mon, Aug 20, 2012 at 10:06:06AM +0200, Ingo Molnar wrote:
>
> > If the answer is 'yes' then there's clear cases where the kernel
> > (should) automatically know the events where we switch from
> > balancing for performance to balancing for power:
>
> No. We can't identify all of these cases and we can't identify
> corner cases. [...]

There's no need to identify 'all' of these cases - but if the
kernel knows then it can have intelligent default behavior.

> [...] Putting this kind of policy in the kernel is an awful
> idea. [...]

A modern kernel better know what state the system is in: on
battery or on AC power.

> [...] It should never be altering policy itself, [...]

The kernel/scheduler simply offers sensible defaults where it
can. User-space can augment/modify/override that in any which
way it wishes to.

This stuff has not been properly sorted out in the last 10+
years since we have battery driven devices, so we might as well
start with the kernel offering sane default behavior where it
can ...

> [...] because it'll get it wrong and people will file bugs
> complaining that it got it wrong and the biggest case where
> you *need* to be able to handle switching between performance
> and power optimisations (your rack management unit just told
> you that you're going to have to drop power consumption by
> 20W) is one where the kernel doesn't have all the information
> it needs to do this. So why bother at all?

The point is to have a working default mechanism.

Thanks,

Ingo
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/