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


Groups > linux.kernel > #1669104

Re: [PATCH 2/5] x86: use common aperfmperf_khz_on_cpu() to calculate KHz using APERF/MPERF

From "Rafael J. Wysocki" <rjw@rjwysocki.net>
Newsgroups linux.kernel
Subject Re: [PATCH 2/5] x86: use common aperfmperf_khz_on_cpu() to calculate KHz using APERF/MPERF
Date 2017-06-19 16:30 +0200
Message-ID <tU5QJ-3LZ-1@gated-at.bofh.it> (permalink)
References <tPVwB-6GZ-5@gated-at.bofh.it> <tTb29-8mW-1@gated-at.bofh.it> <tU48i-2E1-1@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


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

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

[PATCH 0/5] x86, cpufreq: consolidate APERF/MPERF calculation Len Brown <lenb@kernel.org> - 2017-06-08 04:40 +0200
  [PATCH 2/5] x86: use common aperfmperf_khz_on_cpu() to calculate KHz using APERF/MPERF Len Brown <lenb@kernel.org> - 2017-06-08 04:40 +0200
    Re: [PATCH 2/5] x86: use common aperfmperf_khz_on_cpu() to calculate KHz using APERF/MPERF "Rafael J. Wysocki" <rjw@rjwysocki.net> - 2017-06-17 02:40 +0200
      Re: [PATCH 2/5] x86: use common aperfmperf_khz_on_cpu() to calculate  KHz using APERF/MPERF Len Brown <lenb@kernel.org> - 2017-06-17 03:50 +0200
        Re: [PATCH 2/5] x86: use common aperfmperf_khz_on_cpu() to calculate KHz using APERF/MPERF "Rafael J. Wysocki" <rjw@rjwysocki.net> - 2017-06-19 14:40 +0200
          Re: [PATCH 2/5] x86: use common aperfmperf_khz_on_cpu() to calculate KHz using APERF/MPERF "Rafael J. Wysocki" <rjw@rjwysocki.net> - 2017-06-19 16:30 +0200
  [PATCH 3/5] intel_pstate: remove intel_pstate.get() Len Brown <lenb@kernel.org> - 2017-06-08 04:40 +0200
    Re: [PATCH 3/5] intel_pstate: remove intel_pstate.get() "Rafael J. Wysocki" <rjw@rjwysocki.net> - 2017-06-17 02:10 +0200
      Re: [PATCH 3/5] intel_pstate: remove intel_pstate.get() Len Brown <lenb@kernel.org> - 2017-06-17 02:40 +0200
        Re: [PATCH 3/5] intel_pstate: remove intel_pstate.get() "Rafael J. Wysocki" <rjw@rjwysocki.net> - 2017-06-17 02:50 +0200
          Re: [PATCH 3/5] intel_pstate: remove intel_pstate.get() Len Brown <lenb@kernel.org> - 2017-06-17 03:20 +0200
            Re: [PATCH 3/5] intel_pstate: remove intel_pstate.get() "Rafael J. Wysocki" <rjw@rjwysocki.net> - 2017-06-17 03:30 +0200
              Re: [PATCH 3/5] intel_pstate: remove intel_pstate.get() "Rafael J. Wysocki" <rafael@kernel.org> - 2017-06-17 03:50 +0200
                Re: [PATCH 3/5] intel_pstate: remove intel_pstate.get() Len Brown <lenb@kernel.org> - 2017-06-17 04:10 +0200
    Re: [PATCH 3/5] intel_pstate: remove intel_pstate.get() "Rafael J. Wysocki" <rjw@rjwysocki.net> - 2017-06-17 02:40 +0200
  [PATCH 1/5] x86: do not use cpufreq_quick_get() for /proc/cpuinfo "cpu MHz" Len Brown <lenb@kernel.org> - 2017-06-08 04:50 +0200
  [PATCH 4/5] intel_pstate: skip scheduler hook when in "performance" mode. Len Brown <lenb@kernel.org> - 2017-06-08 04:50 +0200
    Re: [PATCH 4/5] intel_pstate: skip scheduler hook when in "performance" mode. "Rafael J. Wysocki" <rjw@rjwysocki.net> - 2017-06-17 02:20 +0200
      Re: [PATCH 4/5] intel_pstate: skip scheduler hook when in  "performance" mode. Len Brown <lenb@kernel.org> - 2017-06-17 03:00 +0200
        Re: [PATCH 4/5] intel_pstate: skip scheduler hook when in "performance" mode. "Rafael J. Wysocki" <rjw@rjwysocki.net> - 2017-06-17 03:20 +0200
          Re: [PATCH 4/5] intel_pstate: skip scheduler hook when in  "performance" mode. Len Brown <lenb@kernel.org> - 2017-06-17 03:40 +0200
          Re: [PATCH 4/5] intel_pstate: skip scheduler hook when in  "performance" mode. Len Brown <lenb@kernel.org> - 2017-06-17 03:40 +0200
  [PATCH 5/5] intel_pstate: delete scheduler hook in HWP mode Len Brown <lenb@kernel.org> - 2017-06-08 04:50 +0200
    Re: [PATCH 5/5] intel_pstate: delete scheduler hook in HWP mode "Rafael J. Wysocki" <rjw@rjwysocki.net> - 2017-06-17 02:20 +0200
      Re: [PATCH 5/5] intel_pstate: delete scheduler hook in HWP mode Len Brown <lenb@kernel.org> - 2017-06-17 03:30 +0200

csiph-web