Re: [PATCH] cpufreq: intel_pstate: Fix cpuinfo_cur_freq after performance governor changes

2017-07-25 Thread Rafael J. Wysocki
On Tuesday, July 25, 2017 07:03:36 AM Huaisheng HS1 Ye wrote: > Hi Srinivas, > Your idea is great, but your patch at cpufreq.c will force all platforms to > use scaling_cur_freq as first choice when userspace wants to access > cpuinfo_cur_freq. It is ok for intel x86 platfrom but hard to say with

Re: [PATCH] cpufreq: intel_pstate: Fix cpuinfo_cur_freq after performance governor changes

2017-07-25 Thread Rafael J. Wysocki
On Monday, July 24, 2017 07:57:45 PM Srinivas Pandruvada wrote: > On Tue, 2017-07-25 at 01:46 +, Huaisheng HS1 Ye wrote: > > Hi Rafael, > > > > If you delete "get" function implement within intel_pstate, the > > sysfs interface cpuinfo_cur_freq will display all the > > time. > cpuinfo_cur_f

RE: [PATCH] cpufreq: intel_pstate: Fix cpuinfo_cur_freq after performance governor changes

2017-07-25 Thread Huaisheng HS1 Ye
Hi Srinivas, Oh, I see. Originally I thought this function "arch_freq_get_on_cpu" would have chance to expand to other platforms in the future. Because I found that it appears at cpufreq.c as __weak. But if it is sure that this function only works for x86 all the time, I think it doesn't matte

Re: [PATCH] cpufreq: intel_pstate: Fix cpuinfo_cur_freq after performance governor changes

2017-07-25 Thread Srinivas Pandruvada
Hi Huaisheng, On Tue, 2017-07-25 at 07:03 +, Huaisheng HS1 Ye wrote: > Hi Srinivas, > Your idea is great, but your patch at cpufreq.c will force all > platforms to use scaling_cur_freq as first choice when userspace > wants to access cpuinfo_cur_freq. It is ok for intel x86 platfrom but > hard

RE: [PATCH] cpufreq: intel_pstate: Fix cpuinfo_cur_freq after performance governor changes

2017-07-25 Thread Huaisheng HS1 Ye
Hi Srinivas, Your idea is great, but your patch at cpufreq.c will force all platforms to use scaling_cur_freq as first choice when userspace wants to access cpuinfo_cur_freq. It is ok for intel x86 platfrom but hard to say with other platforms. I modified it like that, it looks more reasonable.

Re: [PATCH] cpufreq: intel_pstate: Fix cpuinfo_cur_freq after performance governor changes

2017-07-24 Thread Srinivas Pandruvada
On Tue, 2017-07-25 at 01:46 +, Huaisheng HS1 Ye wrote: > Hi Rafael, > > If you delete "get" function implement within intel_pstate, the  > sysfs interface cpuinfo_cur_freq will display all the > time.  cpuinfo_cur_freq by definition should show actual frequency HW frequency. Unless I missed s

RE: [PATCH] cpufreq: intel_pstate: Fix cpuinfo_cur_freq after performance governor changes

2017-07-24 Thread Huaisheng HS1 Ye
Hi Rafael, If you delete "get" function implement within intel_pstate, the sysfs interface cpuinfo_cur_freq will display all the time. To be honest, at the beginning I have consider this way like you patched, but based two reasons below, it is conservative for us to do that. 1. I am worried a

Re: [PATCH] cpufreq: intel_pstate: Fix cpuinfo_cur_freq after performance governor changes

2017-07-24 Thread Rafael J. Wysocki
On Monday, July 24, 2017 03:32:47 PM Huaisheng HS1 Ye wrote: > Hi Rafael, > Thanks for your reply. > > > On Monday, July 24, 2017 05:43:14 AM Huaisheng HS1 Ye wrote: > > > After commit 82b4e03e01bc (intel_pstate: skip scheduler hook when in > > > "performance" mode) Software P-state control modes

RE: [PATCH] cpufreq: intel_pstate: Fix cpuinfo_cur_freq after performance governor changes

2017-07-24 Thread Huaisheng HS1 Ye
Hi Rafael, Thanks for your reply. > On Monday, July 24, 2017 05:43:14 AM Huaisheng HS1 Ye wrote: > > After commit 82b4e03e01bc (intel_pstate: skip scheduler hook when in > > "performance" mode) Software P-state control modes couldn't get > > dynamic value during performance mode, > > Please expla

Re: [PATCH] cpufreq: intel_pstate: Fix cpuinfo_cur_freq after performance governor changes

2017-07-24 Thread Rafael J. Wysocki
On Monday, July 24, 2017 05:43:14 AM Huaisheng HS1 Ye wrote: > After commit 82b4e03e01bc (intel_pstate: skip scheduler hook when > in "performance" mode) Software P-state control modes couldn't get > dynamic value during performance mode, Please explain what you mean here. I guess you carried out

[PATCH] cpufreq: intel_pstate: Fix cpuinfo_cur_freq after performance governor changes

2017-07-23 Thread Huaisheng HS1 Ye
After commit 82b4e03e01bc (intel_pstate: skip scheduler hook when in "performance" mode) Software P-state control modes couldn't get dynamic value during performance mode, and it still in last value from powersave mode, so clear its value to get same behavior as Hardware P-state to avoid confusion.