linux-pm.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Viresh Kumar <viresh.kumar@linaro.org>
To: "Rafael Wysocki" <rjw@rjwysocki.net>,
	"Borislav Petkov" <bp@alien8.de>,
	"David S. Miller" <davem@davemloft.net>,
	"H. Peter Anvin" <hpa@zytor.com>,
	"Ingo Molnar" <mingo@redhat.com>,
	"Paolo Bonzini" <pbonzini@redhat.com>,
	"Radim Krčmář" <rkrcmar@redhat.com>,
	"Russell King" <linux@armlinux.org.uk>,
	"Thomas Gleixner" <tglx@linutronix.de>,
	x86@kernel.org
Cc: Viresh Kumar <viresh.kumar@linaro.org>,
	linux-pm@vger.kernel.org,
	Vincent Guittot <vincent.guittot@linaro.org>,
	kvm@vger.kernel.org, linux-arm-kernel@lists.infradead.org,
	linux-kernel@vger.kernel.org, sparclinux@vger.kernel.org
Subject: [PATCH 0/7] cpufreq: Call transition notifier only once for each policy
Date: Thu, 14 Mar 2019 12:12:46 +0530	[thread overview]
Message-ID: <cover.1552545525.git.viresh.kumar@linaro.org> (raw)

Currently we call the cpufreq transition notifiers once for each CPU of
the policy->cpus cpumask, which isn't that efficient. This patchset
tries to simplify that by adding another field in struct cpufreq_freqs,
cpus, so the callback has all the information available with a single
call for each policy.

I have tested this on arm64 platform and is compile tested for other
platforms. This has gone through 0-day testing as well, I have pushed my
branch over a week back to the public tree which gets tested by 0-day
bot.

FWIW, it maybe possible to make the callback implementation more
efficient now that they are called only once for each policy, but this
patchset only did the minimum amount of changes to make sure we don't
end up breaking otherwise working code.

--
viresh

Viresh Kumar (7):
  cpufreq: Pass policy->related_cpus to transition notifiers
  ARM: smp: Update cpufreq transition notifier to handle multiple CPUs
  ARM: twd: Update cpufreq transition notifier to handle multiple CPUs
  sparc64: Update cpufreq transition notifier to handle multiple CPUs
  x86/tsc: Update cpufreq transition notifier to handle multiple CPUs
  KVM: x86: Update cpufreq transition notifier to handle multiple CPUs
  cpufreq: Call transition notifiers only once for each policy

 arch/arm/kernel/smp.c       | 23 ++++++++++++++---------
 arch/arm/kernel/smp_twd.c   |  9 ++++++---
 arch/sparc/kernel/time_64.c | 28 ++++++++++++++++------------
 arch/x86/kernel/tsc.c       | 31 ++++++++++++++++++++-----------
 arch/x86/kvm/x86.c          | 31 ++++++++++++++++++++-----------
 drivers/cpufreq/cpufreq.c   | 19 ++++++++++---------
 include/linux/cpufreq.h     |  2 +-
 7 files changed, 87 insertions(+), 56 deletions(-)

-- 
2.21.0.rc0.269.g1a574e7a288b

             reply	other threads:[~2019-03-14  6:42 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-03-14  6:42 Viresh Kumar [this message]
2019-03-14  6:42 ` [PATCH 1/7] cpufreq: Pass policy->related_cpus to transition notifiers Viresh Kumar
2019-03-14  6:42 ` [PATCH 2/7] ARM: smp: Update cpufreq transition notifier to handle multiple CPUs Viresh Kumar
2019-03-14  6:42 ` [PATCH 3/7] ARM: twd: " Viresh Kumar
2019-03-14  6:42 ` [PATCH 4/7] sparc64: " Viresh Kumar
2019-03-14 17:27   ` David Miller
2019-03-14  6:42 ` [PATCH 5/7] x86/tsc: " Viresh Kumar
2019-03-14  9:33   ` Rafael J. Wysocki
2019-03-14 10:03     ` Viresh Kumar
2019-03-14  6:42 ` [PATCH 6/7] KVM: x86: " Viresh Kumar
2019-03-14  6:42 ` [PATCH 7/7] cpufreq: Call transition notifiers only once for each policy Viresh Kumar
2019-03-14  9:28 ` [PATCH 0/7] cpufreq: Call transition notifier " Rafael J. Wysocki
2019-03-14  9:40   ` Rafael J. Wysocki
2019-03-14 10:18     ` Viresh Kumar
2019-03-14 10:16   ` Viresh Kumar
2019-03-14 10:55     ` Rafael J. Wysocki
2019-03-14 11:03       ` Viresh Kumar

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=cover.1552545525.git.viresh.kumar@linaro.org \
    --to=viresh.kumar@linaro.org \
    --cc=bp@alien8.de \
    --cc=davem@davemloft.net \
    --cc=hpa@zytor.com \
    --cc=kvm@vger.kernel.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pm@vger.kernel.org \
    --cc=linux@armlinux.org.uk \
    --cc=mingo@redhat.com \
    --cc=pbonzini@redhat.com \
    --cc=rjw@rjwysocki.net \
    --cc=rkrcmar@redhat.com \
    --cc=sparclinux@vger.kernel.org \
    --cc=tglx@linutronix.de \
    --cc=vincent.guittot@linaro.org \
    --cc=x86@kernel.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).