linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Rafael J. Wysocki" <rjw@sisk.pl>
To: svaidy@linux.vnet.ibm.com,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
Cc: Victor Lowther <victor.lowther@gmail.com>,
	Len Brown <lenb@kernel.org>,
	"linux-acpi@vger.kernel.org" <linux-acpi@vger.kernel.org>,
	Matthew Garrett <mjg59@srcf.ucam.org>,
	linux-pm@lists.linux-foundation.org
Subject: Re: [linux-pm] RFC: /sys/power/policy_preference
Date: Sat, 19 Jun 2010 21:04:47 +0200	[thread overview]
Message-ID: <201006192104.47438.rjw@sisk.pl> (raw)
In-Reply-To: <20100619151741.GA18201@dirshya.in.ibm.com>

On Saturday, June 19, 2010, Vaidyanathan Srinivasan wrote:
> * Victor Lowther <victor.lowther@gmail.com> [2010-06-17 11:14:50]:
> 
> > 
> > 
> > 
> > 
> > On Jun 16, 2010, at 4:05 PM, Len Brown <lenb@kernel.org> wrote:
> > 
> > >Create /sys/power/policy_preference, giving user-space
> > >the ability to express its preference for kernel based
> > >power vs. performance decisions in a single place.
> > >
> > >This gives kernel sub-systems and drivers a central place
> > >to discover this system-wide policy preference.
> > >It also allows user-space to not have to be updated
> > >every time a sub-system or driver adds a new power/perf knob.
> > 
> > I would prefer documenting all the current knobs and adding them to
> > pm-utils so that pm-powersave knows about and can manage them. Once
> > that is done, creating arbitrary powersave levels should be fairly
> > simple.
> 
> Hi Len,
> 
> Reading through this thread, I prefer the above recommendation.

It also reflects my opinion quite well.

> We have three main dimensions of (power savings) control (cpufreq,
> cpuidle and scheduler) and you are combining them into a single policy
> in the kernel.

There's more than that, because we're in the process of adding runtime PM
features to I/O device drivers.

> The challenges are as follows:
> 
> * Number of policies will always limit flexibility
> * More dimensions of control will be added in future and your
>   intention is to transparently include them within these defined
>   polices
> * Even with the current implementations, power savings and performance
>   impact widely vary based on system topology and workload.  There is
>   no easy method to define modes such that one mode will _always_
>   consume less power than the other
> * Each subsystem can override the policy settings and create more
>   combinations anyway
> 
> Your argument is that these modes can serve as a good default and allow
> the user to tune the knobs directly for more sophisticated policies.
> But in that case all kernel subsystem should default to the balanced
> policy and let the user tweak individual subsystems for other modes.
> 
> On the other hand having the policy definitions in user space allows
> us to create more flexible policies by considering higher level
> factors like workload behavior, utilization, platform features,
> power/thermal constraints etc.

The policy_preference levels as proposed are also really arbitrary and they
will usually mean different things on different systems.  If the interpretation
of these values is left to device drivers, then (for example) different network
adapter drivers may interpret "performance" differently and that will lead to
different types of behavior depending on which of them is used.  I think we
should rather use interfaces that unambiguously tell the driver what to do.

Thanks,
Rafael

  reply	other threads:[~2010-06-19 19:06 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-06-16 21:05 RFC: /sys/power/policy_preference Len Brown
2010-06-17  6:03 ` [linux-pm] " Igor.Stoppa
2010-06-17 19:00   ` Len Brown
2010-06-17 16:14 ` Victor Lowther
2010-06-17 19:02   ` Len Brown
2010-06-17 22:23     ` Victor Lowther
2010-06-18  5:56       ` Len Brown
2010-06-18 11:55         ` Victor Lowther
2010-06-19 15:17   ` Vaidyanathan Srinivasan
2010-06-19 19:04     ` Rafael J. Wysocki [this message]
2010-06-17 20:48 ` Mike Chan
2010-06-18  6:25   ` Len Brown
2010-06-21 20:10 ` [linux-pm] " Dipankar Sarma
2010-09-28 16:17 ` x86_energy_perf_policy.c Len Brown
2010-10-23  4:40   ` [PATCH] tools: add x86_energy_perf_policy to program MSR_IA32_ENERGY_PERF_BIAS Len Brown
2010-10-27  3:23     ` Andrew Morton
2010-10-27  6:01       ` Ingo Molnar
2010-10-27 11:43         ` Arnaldo Carvalho de Melo
2010-11-15 16:07     ` [PATCH RESEND] tools: add power/x86/x86_energy_perf_policy " Len Brown
2010-11-17 11:35       ` Andi Kleen
2010-11-22 20:13         ` Len Brown
2010-11-22 20:33           ` Andi Kleen
2010-11-23  4:48             ` Len Brown
2010-11-24  5:31       ` [PATCH v2] tools: create power/x86/x86_energy_perf_policy Len Brown
2010-11-25  5:52         ` Chen Gong
2010-11-25  8:59           ` Chen Gong

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=201006192104.47438.rjw@sisk.pl \
    --to=rjw@sisk.pl \
    --cc=lenb@kernel.org \
    --cc=linux-acpi@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pm@lists.linux-foundation.org \
    --cc=mjg59@srcf.ucam.org \
    --cc=svaidy@linux.vnet.ibm.com \
    --cc=victor.lowther@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).