Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1354082 > unrolled thread

Re: [PATCH v10 1/3] cpufreq: Add mechanism for registering utilization update callbacks

Started byPeter Zijlstra <peterz@infradead.org>
First post2016-03-09 13:40 +0100
Last post2016-03-10 03:20 +0100
Articles 5 — 4 participants

Back to article view | Back to linux.kernel

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  Re: [PATCH v10 1/3] cpufreq: Add mechanism for registering  utilization update callbacks Peter Zijlstra <peterz@infradead.org> - 2016-03-09 13:40 +0100
    Re: [PATCH v10 1/3] cpufreq: Add mechanism for registering  utilization update callbacks "Rafael J. Wysocki" <rafael@kernel.org> - 2016-03-09 14:30 +0100
    Re: [PATCH v10 1/3] cpufreq: Add mechanism for registering  utilization update callbacks "Rafael J. Wysocki" <rafael@kernel.org> - 2016-03-09 14:40 +0100
    Re: [PATCH v10 1/3] cpufreq: Add mechanism for registering  utilization update callbacks Ingo Molnar <mingo@kernel.org> - 2016-03-09 14:40 +0100
    Re: [PATCH v10 1/3] cpufreq: Add mechanism for registering  utilization update callbacks Vincent Guittot <vincent.guittot@linaro.org> - 2016-03-10 03:20 +0100

#1354082 — Re: [PATCH v10 1/3] cpufreq: Add mechanism for registering utilization update callbacks

FromPeter Zijlstra <peterz@infradead.org>
Date2016-03-09 13:40 +0100
SubjectRe: [PATCH v10 1/3] cpufreq: Add mechanism for registering utilization update callbacks
Message-ID<raLzb-7UF-3@gated-at.bofh.it>
On Mon, Feb 15, 2016 at 10:47:22PM +0100, Rafael J. Wysocki wrote:
> From: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
> 
> Introduce a mechanism by which parts of the cpufreq subsystem
> ("setpolicy" drivers or the core) can register callbacks to be
> executed from cpufreq_update_util() which is invoked by the
> scheduler's update_load_avg() on CPU utilization changes.
> 
> This allows the "setpolicy" drivers to dispense with their timers
> and do all of the computations they need and frequency/voltage
> adjustments in the update_load_avg() code path, among other things.
> 
> The update_load_avg() changes were suggested by Peter Zijlstra.
> 
> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
> Acked-by: Viresh Kumar <viresh.kumar@linaro.org>
> ---
>  drivers/cpufreq/cpufreq.c |   45 +++++++++++++++++++++++++++++++++++++++++++++
>  include/linux/cpufreq.h   |   34 ++++++++++++++++++++++++++++++++++
>  kernel/sched/deadline.c   |    4 ++++
>  kernel/sched/fair.c       |   26 +++++++++++++++++++++++++-
>  kernel/sched/rt.c         |    4 ++++
>  kernel/sched/sched.h      |    1 +
>  6 files changed, 113 insertions(+), 1 deletion(-)
> 

So with the understanding that we'll work on getting rid of
cpufreq_trigger_update().

Acked-by: Peter Zijlstra (Intel) <peterz@infradead.org>

Also, Vincent had some concerns about the exact placement of the
callback, and I see no problem in moving it if there's need.

[toc] | [next] | [standalone]


#1354107

From"Rafael J. Wysocki" <rafael@kernel.org>
Date2016-03-09 14:30 +0100
Message-ID<raMlA-8tQ-11@gated-at.bofh.it>
In reply to#1354082
On Wed, Mar 9, 2016 at 1:35 PM, Peter Zijlstra <peterz@infradead.org> wrote:
> On Mon, Feb 15, 2016 at 10:47:22PM +0100, Rafael J. Wysocki wrote:
>> From: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
>>
>> Introduce a mechanism by which parts of the cpufreq subsystem
>> ("setpolicy" drivers or the core) can register callbacks to be
>> executed from cpufreq_update_util() which is invoked by the
>> scheduler's update_load_avg() on CPU utilization changes.
>>
>> This allows the "setpolicy" drivers to dispense with their timers
>> and do all of the computations they need and frequency/voltage
>> adjustments in the update_load_avg() code path, among other things.
>>
>> The update_load_avg() changes were suggested by Peter Zijlstra.
>>
>> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
>> Acked-by: Viresh Kumar <viresh.kumar@linaro.org>
>> ---
>>  drivers/cpufreq/cpufreq.c |   45 +++++++++++++++++++++++++++++++++++++++++++++
>>  include/linux/cpufreq.h   |   34 ++++++++++++++++++++++++++++++++++
>>  kernel/sched/deadline.c   |    4 ++++
>>  kernel/sched/fair.c       |   26 +++++++++++++++++++++++++-
>>  kernel/sched/rt.c         |    4 ++++
>>  kernel/sched/sched.h      |    1 +
>>  6 files changed, 113 insertions(+), 1 deletion(-)
>>
>
> So with the understanding that we'll work on getting rid of
> cpufreq_trigger_update().

That definitely is the plan.

> Acked-by: Peter Zijlstra (Intel) <peterz@infradead.org>

Thanks! :-)

> Also, Vincent had some concerns about the exact placement of the
> callback, and I see no problem in moving it if there's need.

Yup, same here.

[toc] | [prev] | [next] | [standalone]


#1354119

From"Rafael J. Wysocki" <rafael@kernel.org>
Date2016-03-09 14:40 +0100
Message-ID<raMvg-5O-7@gated-at.bofh.it>
In reply to#1354082
On Wed, Mar 9, 2016 at 2:32 PM, Ingo Molnar <mingo@kernel.org> wrote:
>
> * Peter Zijlstra <peterz@infradead.org> wrote:
>
>> On Mon, Feb 15, 2016 at 10:47:22PM +0100, Rafael J. Wysocki wrote:
>> > From: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
>> >
>> > Introduce a mechanism by which parts of the cpufreq subsystem
>> > ("setpolicy" drivers or the core) can register callbacks to be
>> > executed from cpufreq_update_util() which is invoked by the
>> > scheduler's update_load_avg() on CPU utilization changes.
>> >
>> > This allows the "setpolicy" drivers to dispense with their timers
>> > and do all of the computations they need and frequency/voltage
>> > adjustments in the update_load_avg() code path, among other things.
>> >
>> > The update_load_avg() changes were suggested by Peter Zijlstra.
>> >
>> > Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
>> > Acked-by: Viresh Kumar <viresh.kumar@linaro.org>
>> > ---
>> >  drivers/cpufreq/cpufreq.c |   45 +++++++++++++++++++++++++++++++++++++++++++++
>> >  include/linux/cpufreq.h   |   34 ++++++++++++++++++++++++++++++++++
>> >  kernel/sched/deadline.c   |    4 ++++
>> >  kernel/sched/fair.c       |   26 +++++++++++++++++++++++++-
>> >  kernel/sched/rt.c         |    4 ++++
>> >  kernel/sched/sched.h      |    1 +
>> >  6 files changed, 113 insertions(+), 1 deletion(-)
>> >
>>
>> So with the understanding that we'll work on getting rid of
>> cpufreq_trigger_update().
>>
>> Acked-by: Peter Zijlstra (Intel) <peterz@infradead.org>
>
> I'm happy with the latest iteration and with the general direction as well!
>
> Acked-by: Ingo Molnar <mingo@kernel.org>

Thanks a lot!

Rafael

[toc] | [prev] | [next] | [standalone]


#1354124

FromIngo Molnar <mingo@kernel.org>
Date2016-03-09 14:40 +0100
Message-ID<raMvg-5O-9@gated-at.bofh.it>
In reply to#1354082
* Peter Zijlstra <peterz@infradead.org> wrote:

> On Mon, Feb 15, 2016 at 10:47:22PM +0100, Rafael J. Wysocki wrote:
> > From: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
> > 
> > Introduce a mechanism by which parts of the cpufreq subsystem
> > ("setpolicy" drivers or the core) can register callbacks to be
> > executed from cpufreq_update_util() which is invoked by the
> > scheduler's update_load_avg() on CPU utilization changes.
> > 
> > This allows the "setpolicy" drivers to dispense with their timers
> > and do all of the computations they need and frequency/voltage
> > adjustments in the update_load_avg() code path, among other things.
> > 
> > The update_load_avg() changes were suggested by Peter Zijlstra.
> > 
> > Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
> > Acked-by: Viresh Kumar <viresh.kumar@linaro.org>
> > ---
> >  drivers/cpufreq/cpufreq.c |   45 +++++++++++++++++++++++++++++++++++++++++++++
> >  include/linux/cpufreq.h   |   34 ++++++++++++++++++++++++++++++++++
> >  kernel/sched/deadline.c   |    4 ++++
> >  kernel/sched/fair.c       |   26 +++++++++++++++++++++++++-
> >  kernel/sched/rt.c         |    4 ++++
> >  kernel/sched/sched.h      |    1 +
> >  6 files changed, 113 insertions(+), 1 deletion(-)
> > 
> 
> So with the understanding that we'll work on getting rid of
> cpufreq_trigger_update().
> 
> Acked-by: Peter Zijlstra (Intel) <peterz@infradead.org>

I'm happy with the latest iteration and with the general direction as well!

Acked-by: Ingo Molnar <mingo@kernel.org>

Thanks,

	Ingo

[toc] | [prev] | [next] | [standalone]


#1354761

FromVincent Guittot <vincent.guittot@linaro.org>
Date2016-03-10 03:20 +0100
Message-ID<raYmK-aJ-29@gated-at.bofh.it>
In reply to#1354082
On 9 March 2016 at 19:35, Peter Zijlstra <peterz@infradead.org> wrote:
> On Mon, Feb 15, 2016 at 10:47:22PM +0100, Rafael J. Wysocki wrote:
>> From: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
>>
>> Introduce a mechanism by which parts of the cpufreq subsystem
>> ("setpolicy" drivers or the core) can register callbacks to be
>> executed from cpufreq_update_util() which is invoked by the
>> scheduler's update_load_avg() on CPU utilization changes.
>>
>> This allows the "setpolicy" drivers to dispense with their timers
>> and do all of the computations they need and frequency/voltage
>> adjustments in the update_load_avg() code path, among other things.
>>
>> The update_load_avg() changes were suggested by Peter Zijlstra.
>>
>> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
>> Acked-by: Viresh Kumar <viresh.kumar@linaro.org>
>> ---
>>  drivers/cpufreq/cpufreq.c |   45 +++++++++++++++++++++++++++++++++++++++++++++
>>  include/linux/cpufreq.h   |   34 ++++++++++++++++++++++++++++++++++
>>  kernel/sched/deadline.c   |    4 ++++
>>  kernel/sched/fair.c       |   26 +++++++++++++++++++++++++-
>>  kernel/sched/rt.c         |    4 ++++
>>  kernel/sched/sched.h      |    1 +
>>  6 files changed, 113 insertions(+), 1 deletion(-)
>>
>
> So with the understanding that we'll work on getting rid of
> cpufreq_trigger_update().
>
> Acked-by: Peter Zijlstra (Intel) <peterz@infradead.org>
>
> Also, Vincent had some concerns about the exact placement of the
> callback, and I see no problem in moving it if there's need.

Yes, as explained previously we can probably  use other placement to
not miss any immediate change of rq's utilization because of task
migration but this optimization can probably be done in a next step

> --
> To unsubscribe from this list: send the line "unsubscribe linux-pm" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web