Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1362231 > unrolled thread

[PATCH] cpufreq: governor: Always schedule work on the CPU running update

Started by"Rafael J. Wysocki" <rjw@rjwysocki.net>
First post2016-03-22 01:20 +0100
Last post2016-03-22 06:00 +0100
Articles 3 — 3 participants

Back to article view | Back to linux.kernel


Contents

  [PATCH] cpufreq: governor: Always schedule work on the CPU running update "Rafael J. Wysocki" <rjw@rjwysocki.net> - 2016-03-22 01:20 +0100
    Re: [PATCH] cpufreq: governor: Always schedule work on the CPU  running update Viresh Kumar <viresh.kumar@linaro.org> - 2016-03-22 04:00 +0100
      Re: [PATCH] cpufreq: governor: Always schedule work on the CPU  running update Mike Galbraith <umgwanakikbuti@gmail.com> - 2016-03-22 06:00 +0100

#1362231 — [PATCH] cpufreq: governor: Always schedule work on the CPU running update

From"Rafael J. Wysocki" <rjw@rjwysocki.net>
Date2016-03-22 01:20 +0100
Subject[PATCH] cpufreq: governor: Always schedule work on the CPU running update
Message-ID<rfidc-4P4-1@gated-at.bofh.it>
From: Rafael J. Wysocki <rafael.j.wysocki@intel.com>

Modify dbs_irq_work() to always schedule the process-context work
on the current CPU which also ran the dbs_update_util_handler()
that the irq_work being handled came from.

This causes the entire frequency update handling (involving the
"ondemand" or "conservative" governors) to be carried out by the
CPU whose frequency is to be updated and reduces the overall amount
of inter-CPU noise related to cpufreq.

Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
---
 drivers/cpufreq/cpufreq_governor.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Index: linux-pm/drivers/cpufreq/cpufreq_governor.c
===================================================================
--- linux-pm.orig/drivers/cpufreq/cpufreq_governor.c
+++ linux-pm/drivers/cpufreq/cpufreq_governor.c
@@ -245,7 +245,7 @@ static void dbs_irq_work(struct irq_work
 	struct policy_dbs_info *policy_dbs;
 
 	policy_dbs = container_of(irq_work, struct policy_dbs_info, irq_work);
-	schedule_work(&policy_dbs->work);
+	schedule_work_on(smp_processor_id(), &policy_dbs->work);
 }
 
 static void dbs_update_util_handler(struct update_util_data *data, u64 time,

[toc] | [next] | [standalone]


#1362303 — Re: [PATCH] cpufreq: governor: Always schedule work on the CPU running update

FromViresh Kumar <viresh.kumar@linaro.org>
Date2016-03-22 04:00 +0100
SubjectRe: [PATCH] cpufreq: governor: Always schedule work on the CPU running update
Message-ID<rfkI2-6rz-9@gated-at.bofh.it>
In reply to#1362231
On 22-03-16, 01:17, Rafael J. Wysocki wrote:
> From: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
> 
> Modify dbs_irq_work() to always schedule the process-context work
> on the current CPU which also ran the dbs_update_util_handler()
> that the irq_work being handled came from.
> 
> This causes the entire frequency update handling (involving the
> "ondemand" or "conservative" governors) to be carried out by the
> CPU whose frequency is to be updated and reduces the overall amount
> of inter-CPU noise related to cpufreq.
> 
> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
> ---
>  drivers/cpufreq/cpufreq_governor.c |    2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> Index: linux-pm/drivers/cpufreq/cpufreq_governor.c
> ===================================================================
> --- linux-pm.orig/drivers/cpufreq/cpufreq_governor.c
> +++ linux-pm/drivers/cpufreq/cpufreq_governor.c
> @@ -245,7 +245,7 @@ static void dbs_irq_work(struct irq_work
>  	struct policy_dbs_info *policy_dbs;
>  
>  	policy_dbs = container_of(irq_work, struct policy_dbs_info, irq_work);
> -	schedule_work(&policy_dbs->work);
> +	schedule_work_on(smp_processor_id(), &policy_dbs->work);
>  }
>  
>  static void dbs_update_util_handler(struct update_util_data *data, u64 time,

queue_work() used to queue the work on local cpu by default, has that
changed now ?

-- 
viresh

[toc] | [prev] | [next] | [standalone]


#1362326 — Re: [PATCH] cpufreq: governor: Always schedule work on the CPU running update

FromMike Galbraith <umgwanakikbuti@gmail.com>
Date2016-03-22 06:00 +0100
SubjectRe: [PATCH] cpufreq: governor: Always schedule work on the CPU running update
Message-ID<rfmAa-7P9-3@gated-at.bofh.it>
In reply to#1362303
On Tue, 2016-03-22 at 08:21 +0530, Viresh Kumar wrote:
> On 22-03-16, 01:17, Rafael J. Wysocki wrote:
> > From: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
> > 
> > Modify dbs_irq_work() to always schedule the process-context work
> > on the current CPU which also ran the dbs_update_util_handler()
> > that the irq_work being handled came from.
> > 
> > This causes the entire frequency update handling (involving the
> > "ondemand" or "conservative" governors) to be carried out by the
> > CPU whose frequency is to be updated and reduces the overall amount
> > of inter-CPU noise related to cpufreq.
> > 
> > Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
> > ---
> >  drivers/cpufreq/cpufreq_governor.c |    2 +-
> >  1 file changed, 1 insertion(+), 1 deletion(-)
> > 
> > Index: linux-pm/drivers/cpufreq/cpufreq_governor.c
> > ===================================================================
> > --- linux-pm.orig/drivers/cpufreq/cpufreq_governor.c
> > +++ linux-pm/drivers/cpufreq/cpufreq_governor.c
> > @@ -245,7 +245,7 @@ static void dbs_irq_work(struct irq_work
> >  	struct policy_dbs_info *policy_dbs;
> >  
> >  	policy_dbs = container_of(irq_work,
> > structwq_unbound_cpumask policy_dbs_info, irq_work);
> > -	schedule_work(&policy_dbs->work);
> > +	schedule_work_on(smp_processor_id(), &policy_dbs->work);
> >  }
> >  
> >  static void dbs_update_util_handler(struct update_util_data *data,
> > u64 time,
> 
> queue_work() used to queue the work on local cpu by default, has that
> changed now ?

By default it still will, but the user now has the option to deflect
work items with an unspecified target.  These will land on a CPU
included in wq_unbound_cpumask iff the current CPU is excluded
therefrom.

	-Mike

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web