All of lore.kernel.org
 help / color / mirror / Atom feed
From: Viresh Kumar <viresh.kumar@linaro.org>
To: Prarit Bhargava <prarit@redhat.com>
Cc: linux-kernel@vger.kernel.org,
	Srinivas Pandruvada <srinivas.pandruvada@intel.com>,
	Len Brown <len.brown@intel.com>,
	Alexandra Yates <alexandra.yates@intel.com>,
	Kristen Carlson Accardi <kristen@linux.intel.com>,
	"Rafael J. Wysocki" <rjw@rjwysocki.net>,
	linux-pm@vger.kernel.org
Subject: Re: [PATCH 1/2] cpufreq, intel_pstate, Fix limits->max_policy_pct rounding error
Date: Fri, 20 Nov 2015 20:49:44 +0530	[thread overview]
Message-ID: <20151120151944.GE3957@ubuntu> (raw)
In-Reply-To: <564F37C8.60307@redhat.com>

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

  reply	other threads:[~2015-11-20 15:19 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-11-20 12:32 [PATCH 0/2 v2] cpufreq, intel_pstate, Fix rounding errors Prarit Bhargava
2015-11-20 12:32 ` [PATCH 1/2] cpufreq, intel_pstate, Fix limits->max_policy_pct rounding error Prarit Bhargava
2015-11-20 13:18   ` Viresh Kumar
2015-11-20 15:10     ` Prarit Bhargava
2015-11-20 15:19       ` Viresh Kumar [this message]
2015-11-20 15:43         ` Prarit Bhargava
2015-11-20 20:02           ` Pandruvada, Srinivas
2015-11-20 20:02             ` Pandruvada, Srinivas
2015-11-20 23:47             ` Prarit Bhargava
2015-11-20 23:57               ` Pandruvada, Srinivas
2015-11-20 23:57                 ` Pandruvada, Srinivas
2015-11-20 12:32 ` [PATCH 2/2] cpufreq, intel_pstate, fix limits->max_perf " Prarit Bhargava
  -- strict thread matches above, loose matches on Subject: below --
2015-11-20 23:47 [PATCH 0/2 v3] cpufreq, intel_pstate, Fix rounding errors Prarit Bhargava
2015-11-20 23:47 ` [PATCH 1/2] cpufreq, intel_pstate, Fix limits->max_policy_pct rounding error Prarit Bhargava
2015-11-21  0:04   ` Pandruvada, Srinivas

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20151120151944.GE3957@ubuntu \
    --to=viresh.kumar@linaro.org \
    --cc=alexandra.yates@intel.com \
    --cc=kristen@linux.intel.com \
    --cc=len.brown@intel.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pm@vger.kernel.org \
    --cc=prarit@redhat.com \
    --cc=rjw@rjwysocki.net \
    --cc=srinivas.pandruvada@intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.