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]
Date:   Mon, 29 May 2017 14:46:37 +0200
From:   Jiri Olsa <jolsa@...hat.com>
To:     kan.liang@...el.com
Cc:     acme@...nel.org, tglx@...utronix.de, mingo@...hat.com,
        linux-kernel@...r.kernel.org, peterz@...radead.org,
        eranian@...gle.com, jolsa@...nel.org, elliott@....com,
        ak@...ux.intel.com
Subject: Re: [PATCH V2 0/2] measure SMI cost (user)

On Fri, May 26, 2017 at 12:05:36PM -0700, kan.liang@...el.com wrote:
> From: Kan Liang <Kan.liang@...el.com>
> 
> Currently, there is no way to measure the time cost in System management
> mode (SMM) by perf.
> 
> Intel perfmon supports FREEZE_WHILE_SMM bit in IA32_DEBUGCTL. Once it sets,
> the PMU core counters will freeze on SMI handler. But it will not have an
> effect on free running counters. E.g. APERF counter.
> The cost of SMI can be measured by (aperf - unhalted core cycles).
> 
> A new sysfs entry /sys/device/cpu/freeze_on_smi is introduced to set
> FREEZE_WHILE_SMM bit in IA32_DEBUGCTL. (kernel patch, which has been merged.
> The commit ID is 6089327f5424f227bb6a8cf92363c2617e054453)
> 
> A new --smi-cost mode in perf stat is implemented to measure the SMI cost
> by calculating unhalted core cycles and aperf results.
> 
> In practice, the percentages of SMI cycles is very useful for performance
> oriented analysis. So the output will be SMI cycles% and SMI#.
> For users who wants to get the actual value, they can apply --no-metric-only.
> 
> Here is an example of default output.
> 
>  Performance counter stats for 'sudo echo ':
> 
> SMI cycles%          SMI#
>     0.1%              1
> 
>        0.010858678 seconds time elapsed

for some reason I can't get single SMI count generated,
is there a setup/bench that would provoke that?

other than that, the code looks ok

thanks,
jirka

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ