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: <YukEjqcU9UK8IVgf@gmail.com>
Date:   Tue, 2 Aug 2022 13:03:42 +0200
From:   Ingo Molnar <mingo@...nel.org>
To:     Yi Sun <yi.sun@...el.com>
Cc:     dave.hansen@...el.com, sohil.mehta@...el.com, tony.luck@...el.com,
        linux-kernel@...r.kernel.org, x86@...nel.org,
        david.laight@...lab.com, heng.su@...el.com
Subject: Re: [PATCH v2 2/2] scripts/x86: Add script to consume trace log of
 xsave latency


* Yi Sun <yi.sun@...el.com> wrote:

> Consume the trace log dumped by trace points x86_fpu_latency_xsave and
> x86_fpu_latency_xrstor, calculate latency ranges for each RFBM and
> XINUSE combination including min, max, average and 97% tail latency.
> 
> Add the average of 97% tail latency to remove the unreasonable
> data which is introduced by interrupts or other noise. By adding the
> experimental code disabling interrupts before the calculation of
> latency, it's obvious to get the 3% tail latency has been filtered.
> 
> Make use of sqlite3 to make the data statistics more efficient and
> concise. The output looks like following:
> 
> EVENTs                	RFBM   	XINUSE	lat_min	lat_max	lat_avg	lat_avg(97%)
> ----------------------	-------	------	-------	-------	-------	------------
> x86_fpu_latency_xrstor	0x206e7	0x0   	364    	364    	364    	364
> x86_fpu_latency_xrstor	0x206e7	0x202 	112    	1152   	300    	276
> x86_fpu_latency_xsave 	0x206e7	0x202 	80     	278    	141    	137
> x86_fpu_latency_xsave 	0x206e7	0x246 	108    	234    	180    	177
> 
> The XSAVE/XRSTOR latency trace log can be got by two ways:
> 1. Generated by Kernel debugfs
>   echo 1 > /sys/kernel/debug/tracing/events/x86_fpu/enable
>   cat /sys/kernel/debug/tracing/trace_pipe > trace-log
> 
> 2. Generated by helper tool like 'trace-cmd'
>    trace-cmd record -e x86_fpu -F <command>
>    trace-cmd report > trace-log
> 
> Reviewed-by: Tony Luck <tony.luck@...el.com>
> Signed-off-by: Yi Sun <yi.sun@...el.com>
> 
> diff --git a/scripts/x86/xsave-latency-trace.sh b/scripts/x86/xsave-latency-trace.sh
> new file mode 100755
> index 000000000000..d45563984fd6
> --- /dev/null
> +++ b/scripts/x86/xsave-latency-trace.sh

The patchset looks mostly good to me, but I don't think we are supposed to 
add arch dependent instrumentation scripts to scripts/, please put this new 
script somewhere in tools/testing/x86/ or so.

Thanks,

	Ingo

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ