All of lore.kernel.org
 help / color / mirror / Atom feed
From: Victor Lowther <victor.lowther@gmail.com>
To: Len Brown <lenb@kernel.org>
Cc: Linux Power Management List <linux-pm@lists.osdl.org>,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
	"linux-acpi@vger.kernel.org" <linux-acpi@vger.kernel.org>
Subject: Re: [linux-pm] RFC: /sys/power/policy_preference
Date: Fri, 18 Jun 2010 06:55:04 -0500	[thread overview]
Message-ID: <AANLkTimufQp-Mc1QP1w1YxlkfQQZq0t4e_oK_B3O2YBl@mail.gmail.com> (raw)
In-Reply-To: <alpine.LFD.2.00.1006180149120.7628@localhost.localdomain>

On Fri, Jun 18, 2010 at 12:56 AM, Len Brown <lenb@kernel.org> wrote:
> On Thu, 17 Jun 2010, Victor Lowther wrote:
>
>> > The idea here is to not require user-space to need updating
>> > whenever a future knob is invented.  We can do a great job
>> > at documenting the past, but a poor job of documenting the future:-)
>>
>> Well, I would suggest that the habit of not documenting what is
>> happening with power management in the kernel needs to change, then.
>
> Actually some of the knobs I showed in the examples
> have been documented for *years*, yet are ignored
> by user-space today.  I don't want to insult user-space
> programmers, but the reality is that simpler is usually better.

Let me explain where I am coming from, then.  I maintain pm-utils, one
of the main low-level bodies of userspace code that concerns itself
with power management.  I am currently in the process of standardizing
some of the more common power management tweaks so that they will work
in a cross distro manner, and know from this that the documentation we
have is badly fragmented -- if you know exactly what you are looking
for, you can google or grep for it, but if you do not, there is no
easy way to find a list of all the power management settings you can
tune.

>> Having the documentation and example code for how to tweak the various
>> power management settings from userspace is inherently more flexible
>> than trying to expose a single knob from the kernel to userspace for
>> power management, with little loss of flexibility.
>
> Yes, the ultimate in flexibility is to update user-space whenever
> some new driver or new knob appears in the kernel.  I'm not proposing
> that ability be taken away.  I'm proposing that in many cases it
> is unnecessary.

I disagree.  Most of userspace does not care about how the system is
trying to save power.  I maintain one that does, and I do not like the
idea of adding another knob whose entire purpose is to map other,
already existing knobs onto a line, especially when we can do that in
userspace easily enough if anyone actually wants it.

> The idea is to have the ability to add something to the
> kernel and avoid the need to make any change to user-space.

Userspace in this case consists mainly of
acpi-scripts/pm-utils/laptop-mode-tools, upower,
g-p-m/kpowersave/x-p-m, and X. I can only speak for pm-utils, but the
model pm-utils, acpi-scripts, and laptop-mode-tools use does not map
to your proposed knob at all.  We use a two-state model -- either we
are on AC power and use the kernel's default power state, or we are on
battery power and set power management to a set of distro or user
chosen set of parameters.  I am working on making pm-utils contain
some predefined powersaving policies, but I do not expect them to
change the two-state model much more than changing which power
management tweaks are used in the on-ac and on-battery states.

> thanks,
> -Len Brown, Intel Open Source Technology Center
>

  reply	other threads:[~2010-06-18 11:55 UTC|newest]

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

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=AANLkTimufQp-Mc1QP1w1YxlkfQQZq0t4e_oK_B3O2YBl@mail.gmail.com \
    --to=victor.lowther@gmail.com \
    --cc=lenb@kernel.org \
    --cc=linux-acpi@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pm@lists.osdl.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.