Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1411739
| From | Viresh Kumar <viresh.kumar@linaro.org> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [PATCH V2 2/2] cpufreq: Optimize cpufreq_frequency_table_target() |
| Date | 2016-06-02 03:30 +0200 |
| Message-ID | <rFpCp-7NR-11@gated-at.bofh.it> (permalink) |
| References | <rFbSN-7iv-13@gated-at.bofh.it> <rFbSN-7iv-25@gated-at.bofh.it> <rFkjn-4fq-7@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
On 01-06-16, 12:46, Steve Muckle wrote:
> > /*
> > * Find the closest frequency above target_freq.
> > - *
> > - * The table is sorted in the reverse order with respect to the
> > - * frequency and all of the entries are valid (see the initialization).
> > */
> > - entry = policy->freq_table;
> > - do {
> > - entry++;
> > - freq = entry->frequency;
> > - } while (freq >= target_freq && freq != CPUFREQ_TABLE_END);
> > - entry--;
> > + index = cpufreq_frequency_table_target(policy, target_freq,
> > + CPUFREQ_RELATION_L);
>
> This adds a function call to the fast path...
I understand that, but I am not sure how far should we go to avoid
that. Open coding routines to save on that isn't a good idea surely.
I have at least kept this routine in cpufreq.h to avoid a call, but
eventually we will have at least a call somewhere within it. :(
--
viresh
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[PATCH V2 2/2] cpufreq: Optimize cpufreq_frequency_table_target() Viresh Kumar <viresh.kumar@linaro.org> - 2016-06-01 12:50 +0200
Re: [PATCH V2 2/2] cpufreq: Optimize cpufreq_frequency_table_target() Steve Muckle <steve.muckle@linaro.org> - 2016-06-01 21:50 +0200
Re: [PATCH V2 2/2] cpufreq: Optimize cpufreq_frequency_table_target() Viresh Kumar <viresh.kumar@linaro.org> - 2016-06-02 03:30 +0200
Re: [PATCH V2 2/2] cpufreq: Optimize cpufreq_frequency_table_target() Steve Muckle <steve.muckle@linaro.org> - 2016-06-02 20:30 +0200
Re: [PATCH V2 2/2] cpufreq: Optimize cpufreq_frequency_table_target() Viresh Kumar <viresh.kumar@linaro.org> - 2016-06-03 05:20 +0200
csiph-web