Re: [RFC PATCH v2 4/6] sched/fair: Introduce an energy estimation helper function

2018-04-25 Thread Quentin Perret
Hi Leo, Sorry for the delay in responding... On Saturday 21 Apr 2018 at 00:27:53 (+0800), Leo Yan wrote: > On Fri, Apr 20, 2018 at 03:42:45PM +0100, Quentin Perret wrote: > > Hi Leo, > > > > On Wednesday 18 Apr 2018 at 20:15:47 (+0800), Leo Yan wrote: > > > Sorry I introduce mess at here to

Re: [RFC PATCH v2 4/6] sched/fair: Introduce an energy estimation helper function

2018-04-25 Thread Quentin Perret
Hi Leo, Sorry for the delay in responding... On Saturday 21 Apr 2018 at 00:27:53 (+0800), Leo Yan wrote: > On Fri, Apr 20, 2018 at 03:42:45PM +0100, Quentin Perret wrote: > > Hi Leo, > > > > On Wednesday 18 Apr 2018 at 20:15:47 (+0800), Leo Yan wrote: > > > Sorry I introduce mess at here to

Re: [RFC PATCH v2 4/6] sched/fair: Introduce an energy estimation helper function

2018-04-20 Thread Leo Yan
On Fri, Apr 20, 2018 at 03:42:45PM +0100, Quentin Perret wrote: > Hi Leo, > > On Wednesday 18 Apr 2018 at 20:15:47 (+0800), Leo Yan wrote: > > Sorry I introduce mess at here to spread my questions in several > > replying, later will try to ask questions in one replying. Below are > > more

Re: [RFC PATCH v2 4/6] sched/fair: Introduce an energy estimation helper function

2018-04-20 Thread Leo Yan
On Fri, Apr 20, 2018 at 03:42:45PM +0100, Quentin Perret wrote: > Hi Leo, > > On Wednesday 18 Apr 2018 at 20:15:47 (+0800), Leo Yan wrote: > > Sorry I introduce mess at here to spread my questions in several > > replying, later will try to ask questions in one replying. Below are > > more

Re: [RFC PATCH v2 4/6] sched/fair: Introduce an energy estimation helper function

2018-04-20 Thread Quentin Perret
On Wednesday 18 Apr 2018 at 17:23:16 (+0800), Leo Yan wrote: > On Fri, Apr 06, 2018 at 04:36:05PM +0100, Dietmar Eggemann wrote: > > [...] > > > +/* > > + * Estimates the system level energy assuming that p wakes-up on dst_cpu. > > + * > > + * compute_energy() is safe to call only if an energy

Re: [RFC PATCH v2 4/6] sched/fair: Introduce an energy estimation helper function

2018-04-20 Thread Quentin Perret
On Wednesday 18 Apr 2018 at 17:23:16 (+0800), Leo Yan wrote: > On Fri, Apr 06, 2018 at 04:36:05PM +0100, Dietmar Eggemann wrote: > > [...] > > > +/* > > + * Estimates the system level energy assuming that p wakes-up on dst_cpu. > > + * > > + * compute_energy() is safe to call only if an energy

Re: [RFC PATCH v2 4/6] sched/fair: Introduce an energy estimation helper function

2018-04-20 Thread Quentin Perret
Hi Leo, On Wednesday 18 Apr 2018 at 20:15:47 (+0800), Leo Yan wrote: > Sorry I introduce mess at here to spread my questions in several > replying, later will try to ask questions in one replying. Below are > more questions which it's good to bring up: > > The code for energy computation is

Re: [RFC PATCH v2 4/6] sched/fair: Introduce an energy estimation helper function

2018-04-20 Thread Quentin Perret
Hi Leo, On Wednesday 18 Apr 2018 at 20:15:47 (+0800), Leo Yan wrote: > Sorry I introduce mess at here to spread my questions in several > replying, later will try to ask questions in one replying. Below are > more questions which it's good to bring up: > > The code for energy computation is

Re: [RFC PATCH v2 4/6] sched/fair: Introduce an energy estimation helper function

2018-04-18 Thread Leo Yan
Hi Quentin, On Fri, Apr 06, 2018 at 04:36:05PM +0100, Dietmar Eggemann wrote: > From: Quentin Perret > > In preparation for the definition of an energy-aware wakeup path, a > helper function is provided to estimate the consequence on system energy > when a specific task

Re: [RFC PATCH v2 4/6] sched/fair: Introduce an energy estimation helper function

2018-04-18 Thread Leo Yan
Hi Quentin, On Fri, Apr 06, 2018 at 04:36:05PM +0100, Dietmar Eggemann wrote: > From: Quentin Perret > > In preparation for the definition of an energy-aware wakeup path, a > helper function is provided to estimate the consequence on system energy > when a specific task wakes-up on a specific

Re: [RFC PATCH v2 4/6] sched/fair: Introduce an energy estimation helper function

2018-04-18 Thread Quentin Perret
On Wednesday 18 Apr 2018 at 17:19:28 (+0800), Leo Yan wrote: > > > BTW, CPU utilization is decayed value and task_util() is not decayed > > > value, so 'util - task_util(p)' calculates a smaller value than the > > > prev CPU pure utilization, right? > > > > task_util() is the raw PELT signal,

Re: [RFC PATCH v2 4/6] sched/fair: Introduce an energy estimation helper function

2018-04-18 Thread Quentin Perret
On Wednesday 18 Apr 2018 at 17:19:28 (+0800), Leo Yan wrote: > > > BTW, CPU utilization is decayed value and task_util() is not decayed > > > value, so 'util - task_util(p)' calculates a smaller value than the > > > prev CPU pure utilization, right? > > > > task_util() is the raw PELT signal,

Re: [RFC PATCH v2 4/6] sched/fair: Introduce an energy estimation helper function

2018-04-18 Thread Leo Yan
On Fri, Apr 06, 2018 at 04:36:05PM +0100, Dietmar Eggemann wrote: [...] > +/* > + * Estimates the system level energy assuming that p wakes-up on dst_cpu. > + * > + * compute_energy() is safe to call only if an energy model is available for > + * the platform, which is when

Re: [RFC PATCH v2 4/6] sched/fair: Introduce an energy estimation helper function

2018-04-18 Thread Leo Yan
On Fri, Apr 06, 2018 at 04:36:05PM +0100, Dietmar Eggemann wrote: [...] > +/* > + * Estimates the system level energy assuming that p wakes-up on dst_cpu. > + * > + * compute_energy() is safe to call only if an energy model is available for > + * the platform, which is when

Re: [RFC PATCH v2 4/6] sched/fair: Introduce an energy estimation helper function

2018-04-18 Thread Leo Yan
On Wed, Apr 18, 2018 at 09:13:39AM +0100, Quentin Perret wrote: > On Tuesday 17 Apr 2018 at 23:22:13 (+0800), Leo Yan wrote: > > On Fri, Apr 06, 2018 at 04:36:05PM +0100, Dietmar Eggemann wrote: > > > From: Quentin Perret > > > > > > In preparation for the definition of

Re: [RFC PATCH v2 4/6] sched/fair: Introduce an energy estimation helper function

2018-04-18 Thread Leo Yan
On Wed, Apr 18, 2018 at 09:13:39AM +0100, Quentin Perret wrote: > On Tuesday 17 Apr 2018 at 23:22:13 (+0800), Leo Yan wrote: > > On Fri, Apr 06, 2018 at 04:36:05PM +0100, Dietmar Eggemann wrote: > > > From: Quentin Perret > > > > > > In preparation for the definition of an energy-aware wakeup

Re: [RFC PATCH v2 4/6] sched/fair: Introduce an energy estimation helper function

2018-04-18 Thread Quentin Perret
On Tuesday 17 Apr 2018 at 23:22:13 (+0800), Leo Yan wrote: > On Fri, Apr 06, 2018 at 04:36:05PM +0100, Dietmar Eggemann wrote: > > From: Quentin Perret > > > > In preparation for the definition of an energy-aware wakeup path, a > > helper function is provided to estimate

Re: [RFC PATCH v2 4/6] sched/fair: Introduce an energy estimation helper function

2018-04-18 Thread Quentin Perret
On Tuesday 17 Apr 2018 at 23:22:13 (+0800), Leo Yan wrote: > On Fri, Apr 06, 2018 at 04:36:05PM +0100, Dietmar Eggemann wrote: > > From: Quentin Perret > > > > In preparation for the definition of an energy-aware wakeup path, a > > helper function is provided to estimate the consequence on

Re: [RFC PATCH v2 4/6] sched/fair: Introduce an energy estimation helper function

2018-04-17 Thread Leo Yan
On Fri, Apr 06, 2018 at 04:36:05PM +0100, Dietmar Eggemann wrote: > From: Quentin Perret > > In preparation for the definition of an energy-aware wakeup path, a > helper function is provided to estimate the consequence on system energy > when a specific task wakes-up on a

Re: [RFC PATCH v2 4/6] sched/fair: Introduce an energy estimation helper function

2018-04-17 Thread Leo Yan
On Fri, Apr 06, 2018 at 04:36:05PM +0100, Dietmar Eggemann wrote: > From: Quentin Perret > > In preparation for the definition of an energy-aware wakeup path, a > helper function is provided to estimate the consequence on system energy > when a specific task wakes-up on a specific CPU.

Re: [RFC PATCH v2 4/6] sched/fair: Introduce an energy estimation helper function

2018-04-13 Thread Viresh Kumar
On 06-04-18, 16:36, Dietmar Eggemann wrote: > +static inline struct capacity_state > +*find_cap_state(int cpu, unsigned long util) { return NULL; } I saw this somewhere else as well in this series. I believe the line break should happen after "*" as "struct capacity_state *" should be read

Re: [RFC PATCH v2 4/6] sched/fair: Introduce an energy estimation helper function

2018-04-13 Thread Viresh Kumar
On 06-04-18, 16:36, Dietmar Eggemann wrote: > +static inline struct capacity_state > +*find_cap_state(int cpu, unsigned long util) { return NULL; } I saw this somewhere else as well in this series. I believe the line break should happen after "*" as "struct capacity_state *" should be read

Re: [RFC PATCH v2 4/6] sched/fair: Introduce an energy estimation helper function

2018-04-10 Thread Peter Zijlstra
On Tue, Apr 10, 2018 at 02:56:41PM +0100, Quentin Perret wrote: > > So in the last thread there was some discussion about this; in > > particular on how this related to schedutil and if we should tie it into > > that. > > > > I think for starters tying it to schedutil is not a bad idea; ideally >

Re: [RFC PATCH v2 4/6] sched/fair: Introduce an energy estimation helper function

2018-04-10 Thread Peter Zijlstra
On Tue, Apr 10, 2018 at 02:56:41PM +0100, Quentin Perret wrote: > > So in the last thread there was some discussion about this; in > > particular on how this related to schedutil and if we should tie it into > > that. > > > > I think for starters tying it to schedutil is not a bad idea; ideally >

Re: [RFC PATCH v2 4/6] sched/fair: Introduce an energy estimation helper function

2018-04-10 Thread Quentin Perret
On Tuesday 10 Apr 2018 at 14:51:05 (+0200), Peter Zijlstra wrote: > On Fri, Apr 06, 2018 at 04:36:05PM +0100, Dietmar Eggemann wrote: > > +static inline > > +struct capacity_state *find_cap_state(int cpu, unsigned long util) > > +{ > > + struct sched_energy_model *em = *per_cpu_ptr(energy_model,

Re: [RFC PATCH v2 4/6] sched/fair: Introduce an energy estimation helper function

2018-04-10 Thread Quentin Perret
On Tuesday 10 Apr 2018 at 14:51:05 (+0200), Peter Zijlstra wrote: > On Fri, Apr 06, 2018 at 04:36:05PM +0100, Dietmar Eggemann wrote: > > +static inline > > +struct capacity_state *find_cap_state(int cpu, unsigned long util) > > +{ > > + struct sched_energy_model *em = *per_cpu_ptr(energy_model,

Re: [RFC PATCH v2 4/6] sched/fair: Introduce an energy estimation helper function

2018-04-10 Thread Peter Zijlstra
On Fri, Apr 06, 2018 at 04:36:05PM +0100, Dietmar Eggemann wrote: > +static inline > +struct capacity_state *find_cap_state(int cpu, unsigned long util) > +{ > + struct sched_energy_model *em = *per_cpu_ptr(energy_model, cpu); > + struct capacity_state *cs = NULL; > + int i; > + > +

Re: [RFC PATCH v2 4/6] sched/fair: Introduce an energy estimation helper function

2018-04-10 Thread Peter Zijlstra
On Fri, Apr 06, 2018 at 04:36:05PM +0100, Dietmar Eggemann wrote: > +static inline > +struct capacity_state *find_cap_state(int cpu, unsigned long util) > +{ > + struct sched_energy_model *em = *per_cpu_ptr(energy_model, cpu); > + struct capacity_state *cs = NULL; > + int i; > + > +

[RFC PATCH v2 4/6] sched/fair: Introduce an energy estimation helper function

2018-04-06 Thread Dietmar Eggemann
From: Quentin Perret In preparation for the definition of an energy-aware wakeup path, a helper function is provided to estimate the consequence on system energy when a specific task wakes-up on a specific CPU. compute_energy() estimates the OPPs to be reached by all

[RFC PATCH v2 4/6] sched/fair: Introduce an energy estimation helper function

2018-04-06 Thread Dietmar Eggemann
From: Quentin Perret In preparation for the definition of an energy-aware wakeup path, a helper function is provided to estimate the consequence on system energy when a specific task wakes-up on a specific CPU. compute_energy() estimates the OPPs to be reached by all frequency domains and