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] [thread-next>] [day] [month] [year] [list]
Message-ID: <ac97246f-0dbe-6118-dab6-dbc562e3c82c@linux.intel.com>
Date:   Wed, 2 Feb 2022 19:59:52 -0800
From:   Andi Kleen <ak@...ux.intel.com>
To:     Ian Rogers <irogers@...gle.com>, vineet.singh@...el.com,
        perry.taylor@...el.com, caleb.biggers@...el.com,
        asaf.yaffe@...el.com, kshipra.bopardikar@...el.com,
        Kan Liang <kan.liang@...ux.intel.com>,
        Zhengjun Xing <zhengjun.xing@...ux.intel.com>,
        Peter Zijlstra <peterz@...radead.org>,
        Ingo Molnar <mingo@...hat.com>,
        Arnaldo Carvalho de Melo <acme@...nel.org>,
        Mark Rutland <mark.rutland@....com>,
        Alexander Shishkin <alexander.shishkin@...ux.intel.com>,
        Jiri Olsa <jolsa@...hat.com>,
        Namhyung Kim <namhyung@...nel.org>,
        Maxime Coquelin <mcoquelin.stm32@...il.com>,
        Alexandre Torgue <alexandre.torgue@...s.st.com>,
        James Clark <james.clark@....com>,
        John Garry <john.garry@...wei.com>,
        linux-kernel@...r.kernel.org, linux-perf-users@...r.kernel.org
Cc:     Stephane Eranian <eranian@...gle.com>
Subject: Re: [PATCH] perf metrics: Add literal for system TSC frequency


On 2/2/2022 5:07 PM, Ian Rogers wrote:
> Such a literal is useful to calculate things like the average frequency
> [1]. The TSC frequency isn't exposed by sysfs although some experimental
> drivers look to add it [2]. This change computes the value using the
> frequency in /proc/cpuinfo which is accruate at least on Intel
> processors.

FWIW the information in /proc/cpuinfo is going away.

You should really use CPUID for this, which has a new leaf for this. 
Unfortunately there

were a few systems were it was inaccurate, but I suppose you could still 
prefer /proc/cpuinfo

Also your method will not work when the metrics are used through perf 
stat report or perf script

and run on another system. For the perf script case there is support for 
putting the TSC into

perf.data (that is needed for PT), but the header is not dumped by 
default unfortunately.

So likely you would need some new mechanism for that.

-Andi

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ