[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20151120151944.GE3957@ubuntu>
Date: Fri, 20 Nov 2015 20:49:44 +0530
From: Viresh Kumar <viresh.kumar@...aro.org>
To: Prarit Bhargava <prarit@...hat.com>
Cc: linux-kernel@...r.kernel.org,
Srinivas Pandruvada <srinivas.pandruvada@...el.com>,
Len Brown <len.brown@...el.com>,
Alexandra Yates <alexandra.yates@...el.com>,
Kristen Carlson Accardi <kristen@...ux.intel.com>,
"Rafael J. Wysocki" <rjw@...ysocki.net>, linux-pm@...r.kernel.org
Subject: Re: [PATCH 1/2] cpufreq, intel_pstate, Fix limits->max_policy_pct
rounding error
On 20-11-15, 10:10, Prarit Bhargava wrote:
> >> limits->max_policy_pct = clamp_t(int, limits->max_policy_pct, 0 , 100);
> >
> > And put this after the later one ?
> >
> >> + limits->max_policy_pct = DIV_ROUND_UP(policy->max * 100,
> >> + policy->cpuinfo.max_freq);
> >>
> >> /* Normalize user input to [min_policy_pct, max_policy_pct] */
> >> limits->min_perf_pct = max(limits->min_policy_pct,
> >
> > Sure you tested it ? :)
>
> Oops -- and yeah, tested. It works because I rewrite the value of
> max_policy_pct :). I'll repost shortly.
But we aren't doing below anymore, doesn't this change the
calculations at all?
limits->max_policy_pct = clamp_t(int, limits->max_policy_pct, 0 , 100);
--
viresh
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists