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


Groups > linux.kernel > #1668129

Re: [PATCH 3/5] intel_pstate: remove intel_pstate.get()

From "Rafael J. Wysocki" <rafael@kernel.org>
Newsgroups linux.kernel
Subject Re: [PATCH 3/5] intel_pstate: remove intel_pstate.get()
Date 2017-06-17 03:50 +0200
Message-ID <tTb2a-8mW-7@gated-at.bofh.it> (permalink)
References <tPVwB-6GZ-5@gated-at.bofh.it> <tTa65-7Jj-9@gated-at.bofh.it> <tTaz8-8bX-3@gated-at.bofh.it> <tTaIN-8fC-9@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


On Sat, Jun 17, 2017 at 3:21 AM, Rafael J. Wysocki <rjw@rjwysocki.net> wrote:
> On Friday, June 16, 2017 09:10:39 PM Len Brown wrote:
>> >> >> -             get_avg_frequency(cpu),
>> >> >> +             aperfmperf_khz_on_cpu(cpu->cpu),
>> >>
>> >> Note that I deleted the line above in an updated version of this patch
>> >> that I'm ready to send out.
>> >>
>> >> There were a couple of problems with it.
>> >> The first is that it was  ugly that tracing (which occurs only in the
>> >> SW governor case)
>> >> could shorten the measurement interval as seen by the sysfs interface.
>> >>
>> >> The second is that this trace point can be called with irqs off,
>> >> and smp_call_function_single() will WARN when called with irqs off.
>> >>
>> >> Srinivas Acked that I simply remove this field from the tracepoint --
>> >> as it is redundant to calculate it in the kernel when we are already
>> >> exporting the raw values of aperf and mperf.
>> >
>> > This changes the tracepoint format and I know about a couple of user space
>> > scripts that consume these tracepoints though.
>> > What would be wrong with leaving it as is?
>>
>> I'm fine keeping get_avg_frequency() for the purpose of just this tracepoint
>> compatibility, if you think it is useful to do so.
>>
>> I removed it because its only function was the (removed) intel_pstate.get()
>> and this tracepoint.  And this tracepoint already includes aperf and mperf,
>> which can be used to calculate frequency in user-space, if desired.
>> Srinivas Acked' that updating his user-space script would be fine --
>> dunno if that is sufficient.
>
> Well, we can try to make this change and see if there are any complaints
> about it.
>
> But the Srinivas' script is in the tree, so it would be good to update it too
> along with the tracepoint.

On a second thought, in order to compute the frequency, user space
needs to know the scaling and the max_pstate_physical value too, which
may not be straightforward to obtain (on some Atoms, for example).

So why don't we leave the tracepoint as is for now?

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