LWN.net Logo

Re: [PATCH] x86,sched: Fix sched_smt_power_savings totally broken

From:  Ingo Molnar <mingo-AT-elte.hu>
To:  Suresh Siddha <suresh.b.siddha-AT-intel.com>
Subject:  Re: [PATCH] x86,sched: Fix sched_smt_power_savings totally broken
Date:  Tue, 10 Jan 2012 10:18:05 +0100
Message-ID:  <20120110091805.GA28024@elte.hu>
Cc:  Youquan Song <youquan.song-AT-intel.com>, Peter Zijlstra <a.p.zijlstra-AT-chello.nl>, linux-kernel-AT-vger.kernel.org, tglx-AT-linutronix.de, hpa-AT-zytor.com, akpm-AT-linux-foundation.org, stable-AT-vger.kernel.org, arjan-AT-linux.intel.com, len.brown-AT-intel.com, anhua.xu-AT-intel.com, chaohong.guo-AT-intel.com, Youquan Song <youquan.song-AT-linux.intel.com>
Archive-link:  Article, Thread


* Suresh Siddha <suresh.b.siddha@intel.com> wrote:

> On Tue, 2012-01-10 at 00:58 -0500, Youquan Song wrote:
> > Thanks Peter! Here is the patch. 
> 
> Youquan, As far as I know both the
> sched_smt_power_savings/sched_mc_power_savings are broken for atleast an
> year.

We want a single knob, sched_power_savings - with the mc_ and 
smt_ ones still kept and aliased to sched_power_savings, for 
compatibility reasons.

As Peter said, the other reasonable option is to have no knob at 
all and restart this code from scratch.

The other thing we should do is to add sane defaults: to turn on 
sched_power_savings *AUTOMATICALLY* when a system is obviously 
battery driven and turn it off when the system is obviously AC 
driven. User-space can still implement policy and override the 
kernel's default, but there's absolutely no excuse to not offer 
this default ourselves.

The kernel default should probably change automatically on 
powerloss and battery events as well. (again, if user-space 
wants to do it itself, it can do it and we won't interfere.)

Thanks,

	Ingo


(Log in to post comments)

Copyright © 2012, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds