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: <20181113024716.GA27910@sejong>
Date:   Tue, 13 Nov 2018 11:47:16 +0900
From:   Namhyung Kim <namhyung@...nel.org>
To:     Jiri Olsa <jolsa@...hat.com>
Cc:     Alexey Budankov <alexey.budankov@...ux.intel.com>,
        Peter Zijlstra <peterz@...radead.org>,
        Ingo Molnar <mingo@...hat.com>,
        Arnaldo Carvalho de Melo <acme@...nel.org>,
        Alexander Shishkin <alexander.shishkin@...ux.intel.com>,
        Andi Kleen <ak@...ux.intel.com>,
        linux-kernel <linux-kernel@...r.kernel.org>, kernel-team@....com
Subject: Re: [PATCH v15 0/3]: perf: reduce data loss when profiling highly
 parallel CPU bound workloads

Hi,

On Fri, Nov 09, 2018 at 09:22:42AM +0100, Jiri Olsa wrote:
> On Tue, Nov 06, 2018 at 11:53:02AM +0300, Alexey Budankov wrote:
> > 
> > Currently in record mode the tool implements trace writing serially. 
> > The algorithm loops over mapped per-cpu data buffers and stores 
> > ready data chunks into a trace file using write() system call.
> > 
> > At some circumstances the kernel may lack free space in a buffer 
> > because the other buffer's half is not yet written to disk due to 
> > some other buffer's data writing by the tool at the moment.
> > 
> > Thus serial trace writing implementation may cause the kernel 
> > to loose profiling data and that is what observed when profiling 
> > highly parallel CPU bound workloads on machines with big number 
> > of cores.
> > 
> > Experiment with profiling matrix multiplication code executing 128 
> > threads on Intel Xeon Phi (KNM) with 272 cores, like below,
> > demonstrates data loss metrics value of 98%:
> > 
> > /usr/bin/time perf record -o /tmp/perf-ser.data -a -N -B -T -R -g \
> >     --call-graph dwarf,1024 --user-regs=IP,SP,BP --switch-events \
> >     -e cycles,instructions,ref-cycles,software/period=1,name=cs,config=0x3/Duk -- \
> >     matrix.gcc
> > 
> > Data loss metrics is the ratio lost_time/elapsed_time where 
> > lost_time is the sum of time intervals containing PERF_RECORD_LOST 
> > records and elapsed_time is the elapsed application run time 
> > under profiling.
> > 
> > Applying asynchronous trace streaming thru Posix AIO API [1] lowers 
> > data loss metrics value providing 2x improvement (from 98% to ~1%)
> > 
> > Asynchronous trace streaming is currently limited to glibc linkage.
> > musl libc [5] also provides Posix AIO API implementation, however 
> > the patchkit is not tested with it. There may be other libc libraries 
> > linked by Perf tool that currently lack Posix AIO API support [2], 
> > [3], [4] so NO_AIO define may be used to limit Perf tool binary to 
> > serial streaming only.
> > 
> > ---
> >  Alexey Budankov (3):
> > 	perf util: map data buffer for preserving collected data
> > 	perf record: enable asynchronous trace writing
> > 	perf record: extend trace writing to multi AIO
> 
> FYI I was rebasing my threads branch on top of this and
> first 2 won't apply anymore on Arnaldo's perf/core
> 
> Arnaldo,
> could we get this merged soon? the world around is moving
> fast and we don't want 20th revision on this ;-)

I think I gave my ack to this already too.

Thanks,
Namhyung

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ