From: Mike Galbraith <umgwanakikbuti@gmail.com>
To: Viresh Kumar <viresh.kumar@linaro.org>,
"Rafael J. Wysocki" <rjw@rjwysocki.net>
Cc: Linux PM list <linux-pm@vger.kernel.org>,
Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] cpufreq: governor: Always schedule work on the CPU running update
Date: Tue, 22 Mar 2016 05:51:45 +0100 [thread overview]
Message-ID: <1458622305.29862.9.camel@gmail.com> (raw)
In-Reply-To: <20160322025112.GQ27778@vireshk-i7>
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
prev parent reply other threads:[~2016-03-22 4:51 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-03-22 0:17 [PATCH] cpufreq: governor: Always schedule work on the CPU running update Rafael J. Wysocki
2016-03-22 2:51 ` Viresh Kumar
2016-03-22 4:51 ` Mike Galbraith [this message]
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=1458622305.29862.9.camel@gmail.com \
--to=umgwanakikbuti@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pm@vger.kernel.org \
--cc=rjw@rjwysocki.net \
--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;
as well as URLs for NNTP newsgroup(s).