All of lore.kernel.org
 help / color / mirror / Atom feed
From: Peter Zijlstra <peterz@infradead.org>
To: "Rafael J. Wysocki" <rjw@rjwysocki.net>
Cc: Linux PM list <linux-pm@vger.kernel.org>,
	Juri Lelli <juri.lelli@arm.com>,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
	Viresh Kumar <viresh.kumar@linaro.org>,
	Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com>,
	Steve Muckle <steve.muckle@linaro.org>,
	Ingo Molnar <mingo@kernel.org>
Subject: Re: [RFC/RFT][PATCH v3 2/2] cpufreq: schedutil: Switching frequencies from interrupt context
Date: Thu, 25 Feb 2016 12:52:34 +0100	[thread overview]
Message-ID: <20160225115234.GF6357@twins.programming.kicks-ass.net> (raw)
In-Reply-To: <5251325.s7kEicchZh@vostro.rjw.lan>

On Thu, Feb 25, 2016 at 12:10:48PM +0100, Rafael J. Wysocki wrote:
> On Thursday, February 25, 2016 10:08:40 AM Peter Zijlstra wrote:
> > On Thu, Feb 25, 2016 at 12:30:43AM +0100, Rafael J. Wysocki wrote:
> > > +unsigned int acpi_cpufreq_fast_switch(struct cpufreq_policy *policy,
> > > +				      unsigned int target_freq)
> > > +{
> > > +	struct acpi_cpufreq_data *data = policy->driver_data;
> > > +	struct cpufreq_frequency_table *entry;
> > > +	struct acpi_processor_performance *perf;
> > > +	unsigned int uninitialized_var(next_perf_state);
> > > +	unsigned int uninitialized_var(next_freq);
> > > +	unsigned int best_diff;
> > > +
> > > +	for (entry = data->freq_table, best_diff = UINT_MAX;
> > > +	     entry->frequency != CPUFREQ_TABLE_END; entry++) {
> > > +		unsigned int diff, freq = entry->frequency;
> > > +
> > > +		if (freq == CPUFREQ_ENTRY_INVALID)
> > > +			continue;
> > > +
> > > +		diff = abs(freq - target_freq);
> > 
> > Why would you consider frequencies that are below where you want to be?
> 
> Say you have 800 MHz and 1600 MHz to choose from and the request if for
> 900 MHz.  The other may be way off (and different voltage for that matter).

Are there really chips with such crappy choices? That said, for some
scenarios you really do have to pick 1600 because otherwise the work
will not be able to complete in time and the whole purpose of the
machine is moot.

That argues for more than a target frequency argument.

Furthermore, depending on the idle capabilities of the platform, 1600
might still be the better choice, it gives idle time in which it could
power gate the complete thing, still yielding better perf/watt than 100%
pegged at 800.

So I'm not at all sure the nearest freq is a sane general policy.

  reply	other threads:[~2016-02-25 11:52 UTC|newest]

Thread overview: 32+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-02-21 23:16 [RFC/RFT][PATCH 0/1] cpufreq: New governor based on scheduler-provided utilization data Rafael J. Wysocki
2016-02-21 23:18 ` [RFC/RFT][PATCH 1/1] cpufreq: New governor using utilization data from the scheduler Rafael J. Wysocki
2016-02-22 14:16   ` Juri Lelli
2016-02-22 23:02     ` Rafael J. Wysocki
2016-02-23  7:20       ` Steve Muckle
2016-02-24  1:38         ` Rafael J. Wysocki
2016-02-25 11:01       ` Juri Lelli
2016-02-26  2:36         ` Rafael J. Wysocki
2016-03-01 14:56           ` Juri Lelli
2016-03-01 20:26             ` Rafael J. Wysocki
2016-02-24  1:20 ` [RFC/RFT][PATCH v2 0/2] cpufreq: New governor based on scheduler-provided utilization data Rafael J. Wysocki
2016-02-24  1:22   ` [RFC/RFT][PATCH v2 1/2] cpufreq: New governor using utilization data from the scheduler Rafael J. Wysocki
2016-02-25 21:14     ` [RFC/RFT][PATCH v4 " Rafael J. Wysocki
2016-02-27  0:21       ` Rafael J. Wysocki
2016-02-27  4:33       ` Steve Muckle
2016-02-27 15:24         ` Rafael J. Wysocki
2016-03-01  4:10           ` Steve Muckle
2016-03-01 20:20             ` Rafael J. Wysocki
2016-03-03  3:20               ` Steve Muckle
2016-03-03  3:35                 ` Steve Muckle
2016-03-03 19:20                 ` Rafael J. Wysocki
2016-02-24  1:28   ` [RFC/RFT][PATCH v2 2/2] cpufreq: schedutil: Switching frequencies from interrupt context Rafael J. Wysocki
2016-02-24 23:30     ` [RFC/RFT][PATCH v3 " Rafael J. Wysocki
2016-02-25  9:08       ` Peter Zijlstra
2016-02-25  9:12         ` Peter Zijlstra
2016-02-25 11:11           ` Rafael J. Wysocki
2016-02-25 11:10         ` Rafael J. Wysocki
2016-02-25 11:52           ` Peter Zijlstra [this message]
2016-02-25 20:54             ` Rafael J. Wysocki
2016-02-25 21:20     ` [RFC/RFT][PATCH v4 " Rafael J. Wysocki
2016-03-03 14:27 ` [RFC/RFT][PATCH 0/1] cpufreq: New governor based on scheduler-provided utilization data Ingo Molnar
2016-03-03 17:15   ` 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=20160225115234.GF6357@twins.programming.kicks-ass.net \
    --to=peterz@infradead.org \
    --cc=juri.lelli@arm.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pm@vger.kernel.org \
    --cc=mingo@kernel.org \
    --cc=rjw@rjwysocki.net \
    --cc=srinivas.pandruvada@linux.intel.com \
    --cc=steve.muckle@linaro.org \
    --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 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.