mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "Rafael J. Wysocki" <rjw@rjwysocki.net>
To: Len Brown <lenb@kernel.org>
Cc: X86 ML <x86@kernel.org>,
	Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com>,
	"H. Peter Anvin" <hpa@linux.intel.com>,
	Peter Zijlstra <peterz@infradead.org>,
	"Rafael J. Wysocki" <rafael@kernel.org>,
	Linux PM list <linux-pm@vger.kernel.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	Len Brown <len.brown@intel.com>
Subject: Re: [PATCH 2/5] x86: use common aperfmperf_khz_on_cpu() to calculate KHz using APERF/MPERF
Date: Mon, 19 Jun 2017 16:18:07 +0200	[thread overview]
Message-ID: <4066164.lk5f1Ou666@aspire.rjw.lan> (raw)
In-Reply-To: <136184443.Dv0asqkIzm@aspire.rjw.lan>

On Monday, June 19, 2017 02:28:21 PM Rafael J. Wysocki wrote:
> On Friday, June 16, 2017 09:49:00 PM Len Brown wrote:
> > On Fri, Jun 16, 2017 at 8:30 PM, Rafael J. Wysocki <rjw@rjwysocki.net> wrote:
> > > On Wednesday, June 07, 2017 07:39:13 PM Len Brown wrote:
> > >> From: Len Brown <len.brown@intel.com>
> 
> [cut]
> 
> > >
> > > I wonder if we could change intel_pstate_get() to simply return
> > > aperfmperf_khz_on_cpu(cpu_num)?
> > >
> > > That would allow us to avoid the extra branch here and get rid of the
> > > #ifdef x86 from the header.
> > 
> > The reason I put the hook here is specifically so that the same
> > code would always be called on the x86 architecture,
> > no not matter what cpufreq driver is loaded.
> > 
> > Yes, alternatively, all possible driver.get routines could be updated
> > to call the same routine.  That is acpi-cpufreq.c, intel_pstate.c,
> > others?
> 
> Just acpi-cpufreq.c and intel_pstate.c.
> 
> Moreover, I wouldn't change the behavior on systems using acpi-cpufreq.c,
> because why really?

Actually, having thought a bit more about this, I see why that may be useful.

Also the #ifdef CONFIG_X86 in the header is better than an arch header, at
least for now, so I agree with the approach in your patch.

Thanks,
Rafael

  reply	other threads:[~2017-06-19 14:25 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-06-08  2:39 [PATCH 0/5] x86, cpufreq: consolidate APERF/MPERF calculation Len Brown
2017-06-08  2:39 ` [PATCH 1/5] x86: do not use cpufreq_quick_get() for /proc/cpuinfo "cpu MHz" Len Brown
2017-06-08  2:39   ` [PATCH 2/5] x86: use common aperfmperf_khz_on_cpu() to calculate KHz using APERF/MPERF Len Brown
2017-06-17  0:30     ` Rafael J. Wysocki
2017-06-17  1:49       ` Len Brown
2017-06-19 12:28         ` Rafael J. Wysocki
2017-06-19 14:18           ` Rafael J. Wysocki [this message]
2017-06-08  2:39   ` [PATCH 3/5] intel_pstate: remove intel_pstate.get() Len Brown
2017-06-16 23:53     ` Rafael J. Wysocki
2017-06-17  0:35       ` Len Brown
2017-06-17  0:37         ` Rafael J. Wysocki
2017-06-17  1:10           ` Len Brown
2017-06-17  1:21             ` Rafael J. Wysocki
2017-06-17  1:40               ` Rafael J. Wysocki
2017-06-17  2:06                 ` Len Brown
2017-06-17  0:22     ` Rafael J. Wysocki
2017-06-08  2:39   ` [PATCH 4/5] intel_pstate: skip scheduler hook when in "performance" mode Len Brown
2017-06-17  0:04     ` Rafael J. Wysocki
2017-06-17  0:52       ` Len Brown
2017-06-17  1:06         ` Rafael J. Wysocki
2017-06-17  1:31           ` Len Brown
2017-06-17  1:35             ` Len Brown
2017-06-08  2:39   ` [PATCH 5/5] intel_pstate: delete scheduler hook in HWP mode Len Brown
2017-06-17  0:09     ` Rafael J. Wysocki
2017-06-17  1:27       ` Len Brown

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=4066164.lk5f1Ou666@aspire.rjw.lan \
    --to=rjw@rjwysocki.net \
    --cc=hpa@linux.intel.com \
    --cc=len.brown@intel.com \
    --cc=lenb@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pm@vger.kernel.org \
    --cc=peterz@infradead.org \
    --cc=rafael@kernel.org \
    --cc=srinivas.pandruvada@linux.intel.com \
    --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

all inboxes | Powered by JetHome®