From: "Rafael J. Wysocki" <rjw@sisk.pl>
To: Viresh Kumar <viresh.kumar@linaro.org>
Cc: Stratos Karafotis <stratosk@semaphore.gr>,
linux-kernel@vger.kernel.org, cpufreq@vger.kernel.org,
linux-pm@vger.kernel.org
Subject: Re: [PATCH] cpufreq: ondemand: Change the calculation of target frequency
Date: Mon, 03 Jun 2013 12:32:36 +0200 [thread overview]
Message-ID: <4899012.FZHBNtJbTr@vostro.rjw.lan> (raw)
In-Reply-To: <CAKohpokGDFvtaBMKxLTJCkx_WN+HN4eZ7LZ2upBLsXAsmcq7kA@mail.gmail.com>
On Monday, June 03, 2013 12:21:47 PM Viresh Kumar wrote:
> On 2 June 2013 01:07, Rafael J. Wysocki <rjw@sisk.pl> wrote:
> > On Saturday, June 01, 2013 08:26:47 PM Viresh Kumar wrote:
>
> >> Even removal of __cpufreq_driver_getavg() should be done in a separate
> >> patch, so that it can be reverted easily if required later.
> >
> > Why would you want to revert it separately?
>
> We might not need to revert all the changes that Stratos is doing.
> Only a revert of getavg() and its users + a small fix in governor would
> be enough. Stratos patch isn't only about removing getavg() but how
> ondemand works and so breaking stuff might be more useful.
Yes, it's probably better to do the getavg() removal as a separate patch.
> >> >> "Proportional to load" means C * load, so why is "policy->max / 100" *the* right C?
> >> >
> >> > I think, finally(?) I see your point. The right C should be "policy->cpuinfo.max_freq / 100".
> >>
> >> Why are you changing it to cpuinfo.max_freq?? This is fixed once a driver is
> >> initialized.. but user may request a lower max freq for a governor or policy.
> >> Which is actually reflected in policy->max I believe.
> >
> > Which doesn't matter. The formula should provide the same results regardless
> > of the user settings except that the selected frequency should be capped by
> > policy->max (instead of being proportional to it). I think using
> > cpuinfo.max_freq here is correct.
>
> I am confused now about what to use.. This is how I read it:
>
> Assumption: CPU supports following freq range.. 500 MHz, 600 MHz, 700 MHz,
> 800 MHz, 900 MHz, 1 GHz
>
> cpuinfo.max_freq = 1 GHz
> policy->max is set to 600 MHz
>
> Case 1: Use policy->max:
>
> We need load to be over 500/600 (i.e. .834) to move to 600 MHz.
>
> Case 2: Use cpuinfo.max_freq..
>
> We need load to be over 500/1000 (i.e. .5) to move to 600 MHz.
>
> So, obviously the calculations aren't the same..
No, they aren't.
My point is that the set of frequencies to choose from doesn't change with
the changes of user settings, so the computation should use things that
don't with the user settings either.
Thanks,
Rafael
--
I speak only for myself.
Rafael J. Wysocki, Intel Open Source Technology Center.
next prev parent reply other threads:[~2013-06-03 10:23 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-05-30 21:07 Stratos Karafotis
2013-05-31 8:51 ` Viresh Kumar
2013-05-31 16:33 ` Stratos Karafotis
2013-06-01 12:27 ` Rafael J. Wysocki
2013-06-01 12:50 ` Stratos Karafotis
2013-06-01 14:56 ` Viresh Kumar
2013-06-01 16:06 ` Stratos Karafotis
2013-06-03 6:11 ` Viresh Kumar
2013-06-01 19:37 ` Rafael J. Wysocki
2013-06-03 6:51 ` Viresh Kumar
2013-06-03 6:55 ` Viresh Kumar
2013-06-03 10:57 ` Rafael J. Wysocki
2013-06-03 11:24 ` Viresh Kumar
2013-06-03 16:12 ` Stratos Karafotis
2013-06-03 10:32 ` Rafael J. Wysocki [this message]
2013-05-31 8:54 ` Viresh Kumar
2013-05-31 12:42 ` Rafael J. Wysocki
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=4899012.FZHBNtJbTr@vostro.rjw.lan \
--to=rjw@sisk.pl \
--cc=cpufreq@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pm@vger.kernel.org \
--cc=stratosk@semaphore.gr \
--cc=viresh.kumar@linaro.org \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®