Re: [PATCH 5/5] intel_pstate: delete scheduler hook in HWP mode
On Fri, Jun 16, 2017 at 8:09 PM, Rafael J. Wysockiwrote: > On Wednesday, June 07, 2017 07:39:16 PM Len Brown wrote: >> From: Len Brown >> >> The cpufreqa/scaling_cur_freq sysfs attribute is now provided by >> the x86 cpufreq core on all modern x86 systems, including >> all systems supported by the intel_pstate driver. > > Not sure what you mean by "x86 cpufreq core"? I refer to code that builds if (CONFIG_X86 && CONFIG_CPU_FREQ) Since it was enough to provoke a comment form you, how about this wording?: The cpufreq/scaling_cur_freq sysfs attribute is now provided by shared x86 cpufreq code on modern x86 systems, including all systems supported by the intel_pstate driver. > Besides, I'd reorder this change with respect to patch [4/5] as this > eliminates the hook entirely and then the "performance"-related change > would only affect non-HWP. I don't actually see a problem with either order, but i'll send the refresh with the order you suggest. thanks, Len Brown, Intel Open Source Technology Center
Re: [PATCH 5/5] intel_pstate: delete scheduler hook in HWP mode
On Fri, Jun 16, 2017 at 8:09 PM, Rafael J. Wysocki wrote: > On Wednesday, June 07, 2017 07:39:16 PM Len Brown wrote: >> From: Len Brown >> >> The cpufreqa/scaling_cur_freq sysfs attribute is now provided by >> the x86 cpufreq core on all modern x86 systems, including >> all systems supported by the intel_pstate driver. > > Not sure what you mean by "x86 cpufreq core"? I refer to code that builds if (CONFIG_X86 && CONFIG_CPU_FREQ) Since it was enough to provoke a comment form you, how about this wording?: The cpufreq/scaling_cur_freq sysfs attribute is now provided by shared x86 cpufreq code on modern x86 systems, including all systems supported by the intel_pstate driver. > Besides, I'd reorder this change with respect to patch [4/5] as this > eliminates the hook entirely and then the "performance"-related change > would only affect non-HWP. I don't actually see a problem with either order, but i'll send the refresh with the order you suggest. thanks, Len Brown, Intel Open Source Technology Center
Re: [PATCH 5/5] intel_pstate: delete scheduler hook in HWP mode
On Wednesday, June 07, 2017 07:39:16 PM Len Brown wrote: > From: Len Brown> > The cpufreqa/scaling_cur_freq sysfs attribute is now provided by > the x86 cpufreq core on all modern x86 systems, including > all systems supported by the intel_pstate driver. Not sure what you mean by "x86 cpufreq core"? Besides, I'd reorder this change with respect to patch [4/5] as this eliminates the hook entirely and then the "performance"-related change would only affect non-HWP. Thanks, Rafael
Re: [PATCH 5/5] intel_pstate: delete scheduler hook in HWP mode
On Wednesday, June 07, 2017 07:39:16 PM Len Brown wrote: > From: Len Brown > > The cpufreqa/scaling_cur_freq sysfs attribute is now provided by > the x86 cpufreq core on all modern x86 systems, including > all systems supported by the intel_pstate driver. Not sure what you mean by "x86 cpufreq core"? Besides, I'd reorder this change with respect to patch [4/5] as this eliminates the hook entirely and then the "performance"-related change would only affect non-HWP. Thanks, Rafael
[PATCH 5/5] intel_pstate: delete scheduler hook in HWP mode
From: Len BrownThe cpufreqa/scaling_cur_freq sysfs attribute is now provided by the x86 cpufreq core on all modern x86 systems, including all systems supported by the intel_pstate driver. In HWP mode, maintaining that value was the sole purpose of the scheduler hook, intel_pstate_update_util_hwp(), so it can now be removed. Signed-off-by: Len Brown --- drivers/cpufreq/intel_pstate.c | 14 +++--- 1 file changed, 3 insertions(+), 11 deletions(-) diff --git a/drivers/cpufreq/intel_pstate.c b/drivers/cpufreq/intel_pstate.c index 0ff3a4b..718732b 100644 --- a/drivers/cpufreq/intel_pstate.c +++ b/drivers/cpufreq/intel_pstate.c @@ -1726,16 +1726,6 @@ static void intel_pstate_adjust_pstate(struct cpudata *cpu, int target_pstate) fp_toint(cpu->iowait_boost * 100)); } -static void intel_pstate_update_util_hwp(struct update_util_data *data, -u64 time, unsigned int flags) -{ - struct cpudata *cpu = container_of(data, struct cpudata, update_util); - u64 delta_ns = time - cpu->sample.time; - - if ((s64)delta_ns >= INTEL_PSTATE_HWP_SAMPLING_INTERVAL) - intel_pstate_sample(cpu, time); -} - static void intel_pstate_update_util_pid(struct update_util_data *data, u64 time, unsigned int flags) { @@ -1920,6 +1910,9 @@ static void intel_pstate_set_update_util_hook(unsigned int cpu_num) { struct cpudata *cpu = all_cpu_data[cpu_num]; + if (hwp_active) + return; + if (cpu->update_util_set) return; @@ -2543,7 +2536,6 @@ static int __init intel_pstate_init(void) } else { hwp_active++; intel_pstate.attr = hwp_cpufreq_attrs; - pstate_funcs.update_util = intel_pstate_update_util_hwp; goto hwp_cpu_matched; } } else { -- 2.7.4
[PATCH 5/5] intel_pstate: delete scheduler hook in HWP mode
From: Len Brown The cpufreqa/scaling_cur_freq sysfs attribute is now provided by the x86 cpufreq core on all modern x86 systems, including all systems supported by the intel_pstate driver. In HWP mode, maintaining that value was the sole purpose of the scheduler hook, intel_pstate_update_util_hwp(), so it can now be removed. Signed-off-by: Len Brown --- drivers/cpufreq/intel_pstate.c | 14 +++--- 1 file changed, 3 insertions(+), 11 deletions(-) diff --git a/drivers/cpufreq/intel_pstate.c b/drivers/cpufreq/intel_pstate.c index 0ff3a4b..718732b 100644 --- a/drivers/cpufreq/intel_pstate.c +++ b/drivers/cpufreq/intel_pstate.c @@ -1726,16 +1726,6 @@ static void intel_pstate_adjust_pstate(struct cpudata *cpu, int target_pstate) fp_toint(cpu->iowait_boost * 100)); } -static void intel_pstate_update_util_hwp(struct update_util_data *data, -u64 time, unsigned int flags) -{ - struct cpudata *cpu = container_of(data, struct cpudata, update_util); - u64 delta_ns = time - cpu->sample.time; - - if ((s64)delta_ns >= INTEL_PSTATE_HWP_SAMPLING_INTERVAL) - intel_pstate_sample(cpu, time); -} - static void intel_pstate_update_util_pid(struct update_util_data *data, u64 time, unsigned int flags) { @@ -1920,6 +1910,9 @@ static void intel_pstate_set_update_util_hook(unsigned int cpu_num) { struct cpudata *cpu = all_cpu_data[cpu_num]; + if (hwp_active) + return; + if (cpu->update_util_set) return; @@ -2543,7 +2536,6 @@ static int __init intel_pstate_init(void) } else { hwp_active++; intel_pstate.attr = hwp_cpufreq_attrs; - pstate_funcs.update_util = intel_pstate_update_util_hwp; goto hwp_cpu_matched; } } else { -- 2.7.4