Re: [PATCH v2 1/2] x86,sched: Add support for frequency invariance

2019-10-08 Thread Rafael J. Wysocki
On Tue, Oct 8, 2019 at 9:43 AM Giovanni Gherdovich wrote: > > On Thu, 2019-10-03 at 19:53 +0200, Rafael J. Wysocki wrote: > > On Thursday, October 3, 2019 2:15:37 PM CEST Peter Zijlstra wrote: > > > On Thu, Oct 03, 2019 at 12:27:52PM +0200, Rafael J. Wysocki wrote: > > > > On Wednesday, October

Re: [PATCH v2 1/2] x86,sched: Add support for frequency invariance

2019-10-08 Thread Giovanni Gherdovich
On Thu, 2019-10-03 at 19:53 +0200, Rafael J. Wysocki wrote: > On Thursday, October 3, 2019 2:15:37 PM CEST Peter Zijlstra wrote: > > On Thu, Oct 03, 2019 at 12:27:52PM +0200, Rafael J. Wysocki wrote: > > > On Wednesday, October 2, 2019 2:29:25 PM CEST Giovanni Gherdovich wrote: > > > > +static

Re: [PATCH v2 1/2] x86,sched: Add support for frequency invariance

2019-10-04 Thread Peter Zijlstra
On Thu, Oct 03, 2019 at 07:53:49PM +0200, Rafael J. Wysocki wrote: > On Thursday, October 3, 2019 2:15:37 PM CEST Peter Zijlstra wrote: > > On Thu, Oct 03, 2019 at 12:27:52PM +0200, Rafael J. Wysocki wrote: > > > > + if (smp_processor_id() != 0) > > > > + return; > Well, but

Re: [PATCH v2 1/2] x86,sched: Add support for frequency invariance

2019-10-03 Thread Rafael J. Wysocki
On Thursday, October 3, 2019 2:15:37 PM CEST Peter Zijlstra wrote: > On Thu, Oct 03, 2019 at 12:27:52PM +0200, Rafael J. Wysocki wrote: > > On Wednesday, October 2, 2019 2:29:25 PM CEST Giovanni Gherdovich wrote: > > > +static bool turbo_disabled(void) > > > +{ > > > + u64 misc_en; > > > + int

Re: [PATCH v2 1/2] x86,sched: Add support for frequency invariance

2019-10-03 Thread Srinivas Pandruvada
On Thu, 2019-10-03 at 14:15 +0200, Peter Zijlstra wrote: > On Thu, Oct 03, 2019 at 12:27:52PM +0200, Rafael J. Wysocki wrote: > > On Wednesday, October 2, 2019 2:29:25 PM CEST Giovanni Gherdovich > > wrote: > > > +static bool turbo_disabled(void) > > > +{ > > > + u64 misc_en; > > > + int err; > >

Re: [PATCH v2 1/2] x86,sched: Add support for frequency invariance

2019-10-03 Thread Peter Zijlstra
On Thu, Oct 03, 2019 at 12:27:52PM +0200, Rafael J. Wysocki wrote: > On Wednesday, October 2, 2019 2:29:25 PM CEST Giovanni Gherdovich wrote: > > +static bool turbo_disabled(void) > > +{ > > + u64 misc_en; > > + int err; > > + > > + err = rdmsrl_safe(MSR_IA32_MISC_ENABLE, _en); > > + if

Re: [PATCH v2 1/2] x86,sched: Add support for frequency invariance

2019-10-03 Thread Rafael J. Wysocki
On Wednesday, October 2, 2019 2:29:25 PM CEST Giovanni Gherdovich wrote: > Implement arch_scale_freq_capacity() for 'modern' x86. This function > is used by the scheduler to correctly account usage in the face of > DVFS. > [cut] > > Suggested-by: Peter Zijlstra > Signed-off-by: Giovanni

Re: [PATCH v2 1/2] x86,sched: Add support for frequency invariance

2019-10-02 Thread Peter Zijlstra
On Wed, Oct 02, 2019 at 02:29:25PM +0200, Giovanni Gherdovich wrote: > +void x86_arch_scale_freq_tick_enable(void) > +{ > + tick_disable = false; > +} > + > +static void reset_scale_freq(void *arg) > +{ > + this_cpu_write(arch_cpu_freq, SCHED_CAPACITY_SCALE); > +} > + > +void

Re: [PATCH v2 1/2] x86,sched: Add support for frequency invariance

2019-10-02 Thread kbuild test robot
Hi Giovanni, Thank you for the patch! Yet something to improve: [auto build test ERROR on tip/sched/core] [cannot apply to v5.4-rc1 next-20191002] [if your patch is applied to the wrong git tree, please drop us a note to help improve the system. BTW, we also suggest to use '--base' option to

Re: [PATCH v2 1/2] x86,sched: Add support for frequency invariance

2019-10-02 Thread Giovanni Gherdovich
On Wed, 2019-10-02 at 23:23 +0800, kbuild test robot wrote: > Hi Giovanni, > > Thank you for the patch! Yet something to improve: > > [auto build test ERROR on tip/sched/core] > [cannot apply to v5.4-rc1 next-20191002] > [if your patch is applied to the wrong git tree, please drop us a note to

Re: [PATCH v2 1/2] x86,sched: Add support for frequency invariance

2019-10-02 Thread kbuild test robot
Hi Giovanni, Thank you for the patch! Yet something to improve: [auto build test ERROR on tip/sched/core] [cannot apply to v5.4-rc1 next-20191002] [if your patch is applied to the wrong git tree, please drop us a note to help improve the system. BTW, we also suggest to use '--base' option to

[PATCH v2 1/2] x86,sched: Add support for frequency invariance

2019-10-02 Thread Giovanni Gherdovich
Implement arch_scale_freq_capacity() for 'modern' x86. This function is used by the scheduler to correctly account usage in the face of DVFS. The present patch addresses Intel processors specifically and has positive performance and performance-per-watt implications for the schedutil cpufreq