linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/6] cpufreq: schedutil governor
@ 2016-03-02  1:56 Rafael J. Wysocki
  2016-03-02  2:04 ` [PATCH 1/6] cpufreq: Reduce cpufreq_update_util() overhead a bit Rafael J. Wysocki
                   ` (6 more replies)
  0 siblings, 7 replies; 158+ messages in thread
From: Rafael J. Wysocki @ 2016-03-02  1:56 UTC (permalink / raw)
  To: Linux PM list
  Cc: Juri Lelli, Steve Muckle, ACPI Devel Maling List,
	Linux Kernel Mailing List, Peter Zijlstra, Srinivas Pandruvada,
	Viresh Kumar, Vincent Guittot, Michael Turquette

Hi,

My previous intro message still applies somewhat, so here's a link:

http://marc.info/?l=linux-pm&m=145609673008122&w=2

The executive summary of the motivation is that I wanted to do two things:
use the utilization data from the scheduler (it's passed to the governor
as aguments of update callbacks anyway) and make it possible to set
CPU frequency without involving process context (fast frequency switching).

Both have been prototyped in the previous RFCs:

https://patchwork.kernel.org/patch/8426691/
https://patchwork.kernel.org/patch/8426741/

but in the meantime I found a couple of issues in there.

First off, the common governor code relied on by the previous version reset
the sample delay to 0 in order to force an immediate frequency update.  That
doesn't work with the new governor, though, because it computes the frequency
to set in a cpufreq_update_util() callback and (when fast switching is not
used) passes that to a work item which sets the frequency and then restores
the sample delay.  Thus if sysfs changes the sample delay to 0 when work_in_progress
is in effect, it will be overwritten by the work item and so discarded.

When using fast switching, the previous version would update the sample delay
from a scheduler path, but that (on a 32-bit system) might clash with an
update from sysfs leading to a result that's completely off.  That value would
be less than the correct sample delay (I think), so in practice that shouldn't
matter that much, but still it's not nice.

The above means that schedutil cannot really share as much code as I thought it
could with "ondemand" and "conservative".

Moreover, I wanted to have a "rate_limit" tunable (instead of the sampling rate
which doesn't mean what the name suggests in schedutil), but that would be the
only one used by schedutil, so I ended up having to define a new struct to point
to from struct dbs_data just to hold that single value and I would need to
define ->init() and ->exit() callbacks for the governor for that reason (and
the common tunables in struct dbs_data wouldn't be used).

Not to mention the fact that the majority of the common governor code is not
really used by schedutil anyway.

Taking the above into account, I decided to decouple schedutil from the other
governors, but I wanted to avoid duplicating some of the tunables manipulation
code.  Hence patches [3-4/6] taking that code into a separate file so schedutil
can use it too without pulling the rest of the common "ondemand" and
"conservative" code along with it.

Patch [5/6] adds support for fast switching to the core and the ACPI driver,
but doesn't hook it up to anything useful.  That is done in the last patch
that actually adds the new governor.

That depends on two patches I sent previously, [1/6] that makes
cpufreq_update_util() use RCU-sched (one change from the previous version
as requested by Peter) and [2/6] that reworks acpi-cpufreq so the fast
switching (added later in patch [5/6]) can work with all of the frequency
setting methods the driver may use.

Comments welcome.

Thanks,
Rafael

^ permalink raw reply	[flat|nested] 158+ messages in thread

end of thread, other threads:[~2016-03-18 12:34 UTC | newest]

Thread overview: 158+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-03-02  1:56 [PATCH 0/6] cpufreq: schedutil governor Rafael J. Wysocki
2016-03-02  2:04 ` [PATCH 1/6] cpufreq: Reduce cpufreq_update_util() overhead a bit Rafael J. Wysocki
2016-03-03  5:48   ` Viresh Kumar
2016-03-03 11:47   ` Juri Lelli
2016-03-03 13:04     ` Peter Zijlstra
2016-03-02  2:05 ` [PATCH 2/6][Resend] cpufreq: acpi-cpufreq: Make read and write operations more efficient Rafael J. Wysocki
2016-03-02  2:08 ` [PATCH 3/6] cpufreq: governor: New data type for management part of dbs_data Rafael J. Wysocki
2016-03-03  5:53   ` Viresh Kumar
2016-03-03 19:26     ` Rafael J. Wysocki
2016-03-04  5:49       ` Viresh Kumar
2016-03-02  2:10 ` [PATCH 4/6] cpufreq: governor: Move abstract gov_tunables code to a seperate file Rafael J. Wysocki
2016-03-03  6:03   ` Viresh Kumar
2016-03-02  2:12 ` [PATCH 5/6] cpufreq: Support for fast frequency switching Rafael J. Wysocki
2016-03-03  6:00   ` Viresh Kumar
2016-03-04  2:15     ` Rafael J. Wysocki
2016-03-03 11:16   ` Peter Zijlstra
2016-03-03 20:56     ` Rafael J. Wysocki
2016-03-03 21:12       ` Peter Zijlstra
2016-03-03 11:18   ` Peter Zijlstra
2016-03-03 19:39     ` Rafael J. Wysocki
2016-03-02  2:27 ` [PATCH 6/6] cpufreq: schedutil: New governor based on scheduler utilization data Rafael J. Wysocki
2016-03-02 17:10   ` Vincent Guittot
2016-03-02 17:58     ` Rafael J. Wysocki
2016-03-02 22:49       ` Rafael J. Wysocki
2016-03-03 12:20         ` Peter Zijlstra
2016-03-03 12:32           ` Juri Lelli
2016-03-03 16:24           ` Rafael J. Wysocki
2016-03-03 16:37             ` Peter Zijlstra
2016-03-03 16:47               ` Peter Zijlstra
2016-03-04  1:14                 ` Rafael J. Wysocki
2016-03-03 16:55               ` Juri Lelli
2016-03-03 16:56                 ` Peter Zijlstra
2016-03-03 17:14                   ` Juri Lelli
2016-03-03 14:01         ` Vincent Guittot
2016-03-03 15:38           ` Peter Zijlstra
2016-03-03 16:28             ` Peter Zijlstra
2016-03-03 16:42               ` Peter Zijlstra
2016-03-03 17:28               ` Dietmar Eggemann
2016-03-03 18:26                 ` Peter Zijlstra
2016-03-03 19:14                   ` Dietmar Eggemann
2016-03-08 13:09                   ` Peter Zijlstra
2016-03-03 18:58               ` Rafael J. Wysocki
2016-03-03 13:07       ` Vincent Guittot
2016-03-03 20:06         ` Steve Muckle
2016-03-03 20:20           ` Rafael J. Wysocki
2016-03-03 21:37             ` Steve Muckle
2016-03-07  2:41               ` Rafael J. Wysocki
2016-03-08 11:27                 ` Peter Zijlstra
2016-03-08 18:00                   ` Rafael J. Wysocki
2016-03-08 19:26                     ` Peter Zijlstra
2016-03-08 20:05                       ` Rafael J. Wysocki
2016-03-09 10:15                         ` Juri Lelli
2016-03-09 23:41                           ` Rafael J. Wysocki
2016-03-10  4:30                             ` Juri Lelli
2016-03-10 21:01                               ` Rafael J. Wysocki
2016-03-10 23:19                             ` Michael Turquette
2016-03-09 16:39                         ` Peter Zijlstra
2016-03-09 23:28                           ` Rafael J. Wysocki
2016-03-10  3:44                             ` Vincent Guittot
2016-03-10 10:07                               ` Peter Zijlstra
2016-03-10 10:26                                 ` Vincent Guittot
     [not found]                                 ` <CAKfTPtCbjgbJn+68NJPCnmPFtcHD0wGmZRYaw37zSqPXNpo_Uw@mail.gmail.com>
2016-03-10 10:30                                   ` Peter Zijlstra
2016-03-10 10:56                                     ` Peter Zijlstra
2016-03-10 22:28                                       ` Rafael J. Wysocki
2016-03-10  8:43                             ` Peter Zijlstra
2016-03-04  2:56 ` [PATCH v2 0/10] cpufreq: schedutil governor Rafael J. Wysocki
2016-03-04  2:58   ` [PATCH v2 1/10] cpufreq: Reduce cpufreq_update_util() overhead a bit Rafael J. Wysocki
2016-03-09 12:39     ` Peter Zijlstra
2016-03-09 14:17       ` Rafael J. Wysocki
2016-03-09 15:29         ` Peter Zijlstra
2016-03-09 21:35           ` Rafael J. Wysocki
2016-03-10  9:19             ` Peter Zijlstra
2016-03-04  2:59   ` [PATCH v2 2/10][Resend] cpufreq: acpi-cpufreq: Make read and write operations more efficient Rafael J. Wysocki
2016-03-04  3:01   ` [PATCH v2 3/10] cpufreq: governor: New data type for management part of dbs_data Rafael J. Wysocki
2016-03-04  5:52     ` Viresh Kumar
2016-03-04  3:03   ` [PATCH v2 4/10] cpufreq: governor: Move abstract gov_attr_set code to seperate file Rafael J. Wysocki
2016-03-04  5:52     ` Viresh Kumar
2016-03-04  3:05   ` [PATCH v2 5/10] cpufreq: Move governor attribute set headers to cpufreq.h Rafael J. Wysocki
2016-03-04  5:53     ` Viresh Kumar
2016-03-04  3:07   ` [PATCH v2 6/10] cpufreq: Support for fast frequency switching Rafael J. Wysocki
2016-03-04 22:18     ` Steve Muckle
2016-03-04 22:32       ` Rafael J. Wysocki
2016-03-04 22:40         ` Rafael J. Wysocki
2016-03-04 23:18           ` Rafael J. Wysocki
2016-03-04 23:56             ` Steve Muckle
2016-03-05  0:18               ` Rafael J. Wysocki
2016-03-05 11:58                 ` Ingo Molnar
2016-03-05 16:49             ` Peter Zijlstra
2016-03-06  2:17               ` Rafael J. Wysocki
2016-03-07  8:00                 ` Peter Zijlstra
2016-03-07 13:15                   ` Rafael J. Wysocki
2016-03-07 13:32                     ` Peter Zijlstra
2016-03-07 13:42                       ` Rafael J. Wysocki
2016-03-04 22:58         ` Rafael J. Wysocki
2016-03-04 23:59           ` Steve Muckle
2016-03-04  3:12   ` [PATCH v2 7/10] cpufreq: Rework the scheduler hooks for triggering updates Rafael J. Wysocki
2016-03-04  3:14   ` [PATCH v2 8/10] cpufreq: Move scheduler-related code to the sched directory Rafael J. Wysocki
2016-03-04  3:18   ` [PATCH v2 9/10] cpufreq: sched: Re-introduce cpufreq_update_util() Rafael J. Wysocki
2016-03-04 10:50     ` Juri Lelli
2016-03-04 12:58       ` Rafael J. Wysocki
2016-03-04 13:30     ` [PATCH v3 " Rafael J. Wysocki
2016-03-04 21:21       ` Steve Muckle
2016-03-04 21:27         ` Rafael J. Wysocki
2016-03-04 21:36           ` Rafael J. Wysocki
2016-03-04  3:35   ` [PATCH v2 10/10] cpufreq: schedutil: New governor based on scheduler utilization data Rafael J. Wysocki
2016-03-04 11:26     ` Juri Lelli
2016-03-04 13:19       ` Rafael J. Wysocki
2016-03-04 15:56       ` Srinivas Pandruvada
2016-03-08  2:23   ` [PATCH v3 0/7] cpufreq: schedutil governor Rafael J. Wysocki
2016-03-08  2:25     ` [PATCH v3 1/7][Resend] cpufreq: Rework the scheduler hooks for triggering updates Rafael J. Wysocki
2016-03-09 13:41       ` Peter Zijlstra
2016-03-09 14:02         ` Rafael J. Wysocki
2016-03-08  2:26     ` [PATCH v3 2/7][Resend] cpufreq: Move scheduler-related code to the sched directory Rafael J. Wysocki
2016-03-08  2:28     ` [PATCH v3 3/7][Resend] cpufreq: governor: New data type for management part of dbs_data Rafael J. Wysocki
2016-03-08  2:29     ` [PATCH v3 4/7][Resend] cpufreq: governor: Move abstract gov_attr_set code to seperate file Rafael J. Wysocki
2016-03-08  2:38     ` [PATCH v3 5/7] cpufreq: Support for fast frequency switching Rafael J. Wysocki
2016-03-08  2:41     ` [PATCH v3 6/7] cpufreq: sched: Re-introduce cpufreq_update_util() Rafael J. Wysocki
2016-03-08  2:50     ` [PATCH v3 7/7] cpufreq: schedutil: New governor based on scheduler utilization data Rafael J. Wysocki
2016-03-16 14:41     ` [PATCH v4 0/7] cpufreq: schedutil governor Rafael J. Wysocki
2016-03-16 14:43       ` [PATCH v4 1/7] cpufreq: sched: Helpers to add and remove update_util hooks Rafael J. Wysocki
2016-03-16 14:44       ` [PATCH v4 2/7] cpufreq: governor: New data type for management part of dbs_data Rafael J. Wysocki
2016-03-16 14:45       ` [PATCH v4 3/7] cpufreq: governor: Move abstract gov_attr_set code to seperate file Rafael J. Wysocki
2016-03-16 14:46       ` [PATCH v4 4/7] cpufreq: Move governor attribute set headers to cpufreq.h Rafael J. Wysocki
2016-03-16 14:47       ` [PATCH v4 5/7] cpufreq: Move governor symbols " Rafael J. Wysocki
2016-03-16 14:52       ` [PATCH v4 6/7] cpufreq: Support for fast frequency switching Rafael J. Wysocki
2016-03-16 15:35         ` Peter Zijlstra
2016-03-16 16:58           ` Rafael J. Wysocki
2016-03-16 15:43         ` Peter Zijlstra
2016-03-16 16:58           ` Rafael J. Wysocki
2016-03-16 14:59       ` [PATCH v4 7/7] cpufreq: schedutil: New governor based on scheduler utilization data Rafael J. Wysocki
2016-03-16 17:35         ` Peter Zijlstra
2016-03-16 21:42           ` Rafael J. Wysocki
2016-03-16 17:36         ` Peter Zijlstra
2016-03-16 21:34           ` Rafael J. Wysocki
2016-03-16 17:52         ` Peter Zijlstra
2016-03-16 21:38           ` Rafael J. Wysocki
2016-03-16 22:39             ` Peter Zijlstra
2016-03-16 17:53         ` Peter Zijlstra
2016-03-16 21:48           ` Rafael J. Wysocki
2016-03-16 18:14         ` Peter Zijlstra
2016-03-16 21:38           ` Rafael J. Wysocki
2016-03-16 22:40             ` Peter Zijlstra
2016-03-16 22:53               ` Rafael J. Wysocki
2016-03-16 15:27       ` [PATCH v4 0/7] cpufreq: schedutil governor Peter Zijlstra
2016-03-16 16:20         ` Rafael J. Wysocki
2016-03-16 23:51       ` [PATCH v5 6/7][Update] cpufreq: Support for fast frequency switching Rafael J. Wysocki
2016-03-17 11:35         ` Juri Lelli
2016-03-17 11:40           ` Peter Zijlstra
2016-03-17 11:48             ` Juri Lelli
2016-03-17 12:53               ` Rafael J. Wysocki
2016-03-17  0:01       ` [PATCH v5 7/7][Update] cpufreq: schedutil: New governor based on scheduler utilization data Rafael J. Wysocki
2016-03-17 11:30         ` Juri Lelli
2016-03-17 12:54           ` Rafael J. Wysocki
2016-03-17 11:36         ` Peter Zijlstra
2016-03-17 12:54           ` Rafael J. Wysocki
2016-03-17 15:54       ` [PATCH v6 6/7][Update] cpufreq: Support for fast frequency switching Rafael J. Wysocki
2016-03-17 16:01       ` [PATCH v6 7/7][Update] cpufreq: schedutil: New governor based on scheduler utilization data Rafael J. Wysocki
2016-03-18 12:34         ` Patrick Bellasi

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).