Re: [PATCH v14 0/3]: perf: reduce data loss when profiling highly parallel CPU bound workloads
From: Jiri Olsa
Date: Thu Oct 25 2018 - 04:54:46 EST
On Thu, Oct 25, 2018 at 10:59:36AM +0300, Alexey Budankov wrote:
> Hi,
>
> On 15.10.2018 13:17, Jiri Olsa wrote:
> > On Mon, Oct 15, 2018 at 09:26:09AM +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
> >
> > I ran above on 24 cpu server and could not see the gain,
> > but I guess I'd need much bigger server to see that
> >
> > anyway, the code is now nicely separated, and given the
> > advertised results below I have no objections
> >
> > Reviewed-by: Jiri Olsa <jolsa@xxxxxxxxxx>
>
> Is the plan Jiri mentioned earlier to have it as a stand alone patch kit
> or upstream the changes into mainline?
I haven't heard from Arnaldo yet, but I'd like to have this merged in
jirka