All of lore.kernel.org
 help / color / mirror / Atom feed
From: Antti P Miettinen <amiettinen@nvidia.com>
To: Dave Jones <davej@redhat.com>
Cc: "Rafael J. Wysocki" <rjw@sisk.pl>,
	markgross@thegnar.org, Kevin Hilman <khilman@ti.com>,
	Len Brown <len.brown@intel.com>,
	cpufreq List <cpufreq@vger.kernel.org>, j-pihet <j-pihet@ti.com>,
	pavel@ucw.cz, Linux PM list <linux-pm@vger.kernel.org>,
	Peter Zijlstra <a.p.zijlstra@chello.nl>
Subject: Re: [linux-pm] [PATCH 0/2] RFC: CPU frequency max as PM QoS param
Date: Wed, 07 Mar 2012 20:08:23 +0200	[thread overview]
Message-ID: <871up4xp0o.fsf@amiettinen-lnx.nvidia.com> (raw)
In-Reply-To: <20120307165957.GA23690@redhat.com> (Dave Jones's message of "Wed, 7 Mar 2012 11:59:57 -0500")

Dave Jones <davej@redhat.com> writes:
> I think exposing absolute frequencies to applications is a mistake.
> (And one that the core cpufreq made a long time ago). How is an application
> to decide what to set it to without knowledge of the hardware it's
> running on ?

Abstracting the CPU frequency was briefly discussed
previously. Computing performance is affected by many factors, not just
CPU frequency. My view is that the actual frequency values for a given
use case are likely to be very system specific (CPU, memory etc). The
values would probably come from a tuning excercise and would be
configurable parameters of applications.

> I much prefer the idea that was mentioned a few weeks ago during the
> discussion with Peter Zijlstra about cpufreq being more connected to
> the scheduler, and essentially having per-process governors.
>
> Each process gets a /proc/self/power-policy
> This can be 'performance' 'power-save' or 'ondemand'
>  - A global sysfs knob sets the default new processes get.
>  - Processes can adjust it themselves if desired.
>  - There's no need for a system-wide governor any more.
>
> There are some open questions about how this could work.
>
> - A list of rules for desired behaviour when performing state changes
>   when switching between tasks with different policies is needed.
>
> - We don't want to be doing power transitions every context switch,
>   or switching overhead will be brutal.
>   So some kind of lazy state changing may be necessary.
>
> - For 'ondemand', when would the scheduler decide to ramp up/down
>   the speed ?
>
> 	Dave

I think better power/perf requests from applications to kernel are
indeed sorely needed. However, if we are going to construct application
oriented power/performance requests, I think something else than
performance/powersave/ondemand might be more appropriate. For a fixed
hardware platform, an application might well be tuned to know very well
the minimum and maximum levels of CPU frequency that it needs in certain
situation in order to meet the required responsiveness and/or consume
minimum amount of energy. I think performance vs power-save is
unnecessarily coarse setting.

The big problem I see with application oriented metrics is that there
are so many of them. I'd rather keep this kind of complexity outside the
kernel. To me it feels easier to start from the hardware knobs that we
can control, since - in the end - those are the knobs that the kernel
needs to control. And we need consolidation of requests from multiple
applications, but to me exposing hardware oriented parameters towards
the user space is not a problem as such.

	--Antti

      reply	other threads:[~2012-03-07 18:08 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-01-19 12:35 [PATCH 0/2] RFC: CPU frequency max as PM QoS param Antti P Miettinen
2012-01-19 12:35 ` [PATCH 1/2] PM QoS: Add CPU frequency maximum " Antti P Miettinen
2012-01-19 12:35 ` [PATCH 2/2] cpufreq: Enforce PM QoS maximum frequency Antti P Miettinen
2012-02-16  1:06 ` [linux-pm] [PATCH 0/2] RFC: CPU frequency max as PM QoS param Kevin Hilman
2012-02-17  3:04   ` mark gross
2012-02-17  8:12     ` [linux-pm] " Valentin, Eduardo
2012-02-20 10:00       ` Antti P Miettinen
     [not found]         ` <CAGF5oy-64J3vMKvzY=NvdV-m8_wFo=NGZANF_cnVm-iq0s-wZQ@mail.gmail.com>
     [not found]           ` <20120221145632.GA2840@envy17>
     [not found]             ` <87linw5aod.fsf@ti.com>
     [not found]               ` <20120225174449.GA17141@envy17>
2012-02-27 10:17                 ` [linux-pm] " Pihet-XID, Jean
2012-02-27 11:00                   ` Antti P Miettinen
     [not found]                 ` <877gz8wcud.fsf@ti.com>
2012-02-27 15:04                   ` Antti Miettinen
2012-02-28  0:56                     ` [linux-pm] " mark gross
2012-02-28  9:37                       ` Antti P Miettinen
2012-03-04 22:46                         ` Rafael J. Wysocki
2012-03-06 12:23                           ` Antti P Miettinen
2012-03-06 14:37                             ` Dave Jones
2012-03-07  6:38                               ` Antti P Miettinen
2012-03-07 16:59                                 ` Dave Jones
2012-03-07 18:08                                   ` Antti P Miettinen [this message]

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=871up4xp0o.fsf@amiettinen-lnx.nvidia.com \
    --to=amiettinen@nvidia.com \
    --cc=a.p.zijlstra@chello.nl \
    --cc=cpufreq@vger.kernel.org \
    --cc=davej@redhat.com \
    --cc=j-pihet@ti.com \
    --cc=khilman@ti.com \
    --cc=len.brown@intel.com \
    --cc=linux-pm@vger.kernel.org \
    --cc=markgross@thegnar.org \
    --cc=pavel@ucw.cz \
    --cc=rjw@sisk.pl \
    /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.