Messages in this thread | | | From | "Chen, Yu C" <> | Subject | RE: [PATCH][rfc] intel_pstate: Fix user input of min/max to legal policy region | Date | Wed, 9 Sep 2015 02:15:00 +0000 |
| |
Hi ,Rafael
> -----Original Message----- > From: Rafael J. Wysocki [mailto:rjw@rjwysocki.net] > Sent: Tuesday, September 08, 2015 5:47 AM > To: Chen, Yu C; kristen@linux.intel.com > Cc: viresh.kumar@linaro.org; linux-pm@vger.kernel.org; linux- > kernel@vger.kernel.org; Zhang, Rui; lenb@kernel.org > Subject: Re: [PATCH][rfc] intel_pstate: Fix user input of min/max to legal > policy region > > On Wednesday, August 12, 2015 11:49:19 AM Chen Yu wrote: > > In current code, if system is using performance policy, user can > > modify the max_perf_pct to any values lower than 100: > > > > $ grep . /sys/devices/system/cpu/intel_pstate/m*_perf_pct > > /sys/devices/system/cpu/intel_pstate/max_perf_pct:100 > > /sys/devices/system/cpu/intel_pstate/min_perf_pct:100 > > > > $ echo 80 > /sys/devices/system/cpu/intel_pstate/max_perf_pct > > > > $ grep . /sys/devices/system/cpu/intel_pstate/m*_perf_pct > > /sys/devices/system/cpu/intel_pstate/max_perf_pct:80 > > /sys/devices/system/cpu/intel_pstate/min_perf_pct:100 > > > > the max_perf_pct above is lower than min_perf_pct, which is not > > reasonable. > > > > This patch solves this problem by clamping min_perf_pct and > > max_perf_pct to be strictly inside [min_policy_pct,max_policy_pct]. > > > > Signed-off-by: Chen Yu <yu.c.chen@intel.com> > > Looks reasonable to me. > > Kristen, any objections? > Thanks for your reply! According to suggestion from Seiichi, will re-send a V2 version patch, to make some update.
Best Regards, Yu
| |