Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1334167
| From | Viresh Kumar <viresh.kumar@linaro.org> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [PATCH 1/9] cpufreq: governor: Simplify gov_cancel_work() slightly |
| Date | 2016-02-15 06:50 +0100 |
| Message-ID | <r2kcO-55M-7@gated-at.bofh.it> (permalink) |
| References | <r2g9b-2nN-3@gated-at.bofh.it> <r2g9c-2nN-21@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
On 15-02-16, 02:12, Rafael J. Wysocki wrote:
> From: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
>
> The atomic work counter incrementation in gov_cancel_work() is not
> necessary any more, because work items won't be queued up after
> gov_clear_update_util() anyway, so drop it along with the comment
> about how it may be missed by the gov_clear_update_util().
>
> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
> ---
>
> This is a new version of https://patchwork.kernel.org/patch/8291021/ .
>
> Changes from the previous version:
> - Rebase.
>
> ---
> drivers/cpufreq/cpufreq_governor.c | 8 --------
> 1 file changed, 8 deletions(-)
>
> Index: linux-pm/drivers/cpufreq/cpufreq_governor.c
> ===================================================================
> --- linux-pm.orig/drivers/cpufreq/cpufreq_governor.c
> +++ linux-pm/drivers/cpufreq/cpufreq_governor.c
> @@ -300,13 +300,6 @@ static void gov_cancel_work(struct cpufr
> {
> struct policy_dbs_info *policy_dbs = policy->governor_data;
>
> - /* Tell dbs_update_util_handler() to skip queuing up work items. */
> - atomic_inc(&policy_dbs->work_count);
> - /*
> - * If dbs_update_util_handler() is already running, it may not notice
> - * the incremented work_count, so wait for it to complete to prevent its
> - * work item from being queued up after the cancel_work_sync() below.
> - */
> gov_clear_update_util(policy_dbs->policy);
> irq_work_sync(&policy_dbs->irq_work);
> cancel_work_sync(&policy_dbs->work);
> @@ -369,7 +362,6 @@ static void dbs_update_util_handler(stru
> * The work may not be allowed to be queued up right now.
> * Possible reasons:
> * - Work has already been queued up or is in progress.
> - * - The governor is being stopped.
> * - It is too early (too little time from the previous sample).
> */
> if (atomic_inc_return(&policy_dbs->work_count) == 1) {
Acked-by: Viresh Kumar <viresh.kumar@linaro.org>
--
viresh
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[PATCH 0/9] cpufreq governor improvements "Rafael J. Wysocki" <rjw@rjwysocki.net> - 2016-02-15 02:30 +0100
[PATCH 1/9] cpufreq: governor: Simplify gov_cancel_work() slightly "Rafael J. Wysocki" <rjw@rjwysocki.net> - 2016-02-15 02:30 +0100
Re: [PATCH 1/9] cpufreq: governor: Simplify gov_cancel_work() slightly Viresh Kumar <viresh.kumar@linaro.org> - 2016-02-15 06:50 +0100
[PATCH 2/9] cpufreq: governor: Avoid atomic operations in hot paths "Rafael J. Wysocki" <rjw@rjwysocki.net> - 2016-02-15 02:30 +0100
Re: [PATCH 2/9] cpufreq: governor: Avoid atomic operations in hot paths Viresh Kumar <viresh.kumar@linaro.org> - 2016-02-15 07:20 +0100
Re: [PATCH 2/9] cpufreq: governor: Avoid atomic operations in hot paths Viresh Kumar <viresh.kumar@linaro.org> - 2016-02-15 09:30 +0100
[PATCH 7/9] cpufreq: governor: Move rate_mult to struct policy_dbs "Rafael J. Wysocki" <rjw@rjwysocki.net> - 2016-02-15 02:30 +0100
Re: [PATCH 7/9] cpufreq: governor: Move rate_mult to struct policy_dbs Viresh Kumar <viresh.kumar@linaro.org> - 2016-02-15 10:00 +0100
[PATCH 3/9] cpufreq: governor: Fix nice contribution computation in dbs_check_cpu() "Rafael J. Wysocki" <rjw@rjwysocki.net> - 2016-02-15 02:30 +0100
Re: [PATCH 3/9] cpufreq: governor: Fix nice contribution computation in dbs_check_cpu() Viresh Kumar <viresh.kumar@linaro.org> - 2016-02-15 09:30 +0100
[PATCH 9/9] cpufreq: governor: Use microseconds in sample delay computations "Rafael J. Wysocki" <rjw@rjwysocki.net> - 2016-02-15 02:30 +0100
Re: [PATCH 9/9] cpufreq: governor: Use microseconds in sample delay computations Viresh Kumar <viresh.kumar@linaro.org> - 2016-02-15 10:00 +0100
[PATCH 8/9] cpufreq: ondemand: Simplify conditionals in od_dbs_timer() "Rafael J. Wysocki" <rjw@rjwysocki.net> - 2016-02-15 02:30 +0100
Re: [PATCH 8/9] cpufreq: ondemand: Simplify conditionals in od_dbs_timer() Viresh Kumar <viresh.kumar@linaro.org> - 2016-02-15 10:00 +0100
csiph-web