lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <CAJvTdKmBTFOxo=HPDsi91bNVqb+b+D7YRSxDJHYM102D4Ospng@mail.gmail.com>
Date: Tue, 2 Dec 2025 10:02:25 -0500
From: Len Brown <lenb@...nel.org>
To: David Arcari <darcari@...hat.com>
Cc: linux-pm@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH 3/3] tools/power turbostat: allow turbostat to work when
 aperf is not available

Thanks for testing.  I'll send a final patch today.

-L

On Tue, Dec 2, 2025 at 7:55 AM David Arcari <darcari@...hat.com> wrote:
>
>
>
> On 12/1/25 3:11 PM, Len Brown wrote:
> > Something like this?
>
> Yes - this works.  It's actually nice and clean and actually mitigates
> the need for patch 0001.  Clearly an improvement over my patch 3.
>
> How would you like to proceed?  I could resubmit a single v2 patch (with
> an appropriate explanation).
>
> I'd rather not attempt to solve the retry issue.  It's really a second
> order issue and I don't think I'm the appropriate person to do that work.
>
> -DA
>
> >
> > diff --git a/tools/power/x86/turbostat/turbostat.c
> > b/tools/power/x86/turbostat/turbostat.c
> > index 5bc47ad5da09..4a847e7e9c65 100644
> > --- a/tools/power/x86/turbostat/turbostat.c
> > +++ b/tools/power/x86/turbostat/turbostat.c
> > @@ -8530,7 +8530,7 @@ void rapl_perf_init(void)
> >   /* Assumes msr_counter_info is populated */
> >   static int has_amperf_access(void)
> >   {
> > -       return msr_counter_arch_infos[MSR_ARCH_INFO_APERF_INDEX].present &&
> > +       return has_aperf &&
> > msr_counter_arch_infos[MSR_ARCH_INFO_APERF_INDEX].present &&
> >              msr_counter_arch_infos[MSR_ARCH_INFO_MPERF_INDEX].present;
> >   }
> >
> >
> > On Mon, Dec 1, 2025 at 2:53 PM Len Brown <lenb@...nel.org> wrote:
> >>
> >>> ...add_msr_perf_counter() returns -1
> >>
> >> good.  and then add_msr_counter() succeeds because...
> >>
> >>> rdmsr returns zero for MSR_IA32_APERF and MSR_IA32_MPERF.
> >>
> >> Your patch is a good suggestion -- though it checks for APERF only and
> >> not for MPERF.
> >>
> >> We already ran CPUID and cleared has_aperf, so I'm thinking we should
> >> be heading this off earlier.  Let me send you a test patch later today.
> >>
> >> thanks,
> >> Len Brown, Intel Open Source Technology Center
> >
> >
> >
>
>


-- 
Len Brown, Intel Open Source Technology Center

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ