lkml.org 
[lkml]   [2015]   [Sep]   [8]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRE: [PATCH][rfc] intel_pstate: Fix user input of min/max to legal policy region
Date
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

\
 
 \ /
  Last update: 2015-09-09 04:21    [W:0.044 / U:0.064 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site