From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.3 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_PASS,USER_AGENT_MUTT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 23B20ECDE46 for ; Thu, 25 Oct 2018 08:54:47 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id DF24B20824 for ; Thu, 25 Oct 2018 08:54:46 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org DF24B20824 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=redhat.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727033AbeJYR0c (ORCPT ); Thu, 25 Oct 2018 13:26:32 -0400 Received: from mx1.redhat.com ([209.132.183.28]:33362 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726587AbeJYR0c (ORCPT ); Thu, 25 Oct 2018 13:26:32 -0400 Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id BF16F3002B19; Thu, 25 Oct 2018 08:54:44 +0000 (UTC) Received: from krava (unknown [10.40.205.131]) by smtp.corp.redhat.com (Postfix) with SMTP id D69A0605B1; Thu, 25 Oct 2018 08:54:40 +0000 (UTC) Date: Thu, 25 Oct 2018 10:54:39 +0200 From: Jiri Olsa To: Alexey Budankov Cc: Arnaldo Carvalho de Melo , Peter Zijlstra , Ingo Molnar , Alexander Shishkin , Namhyung Kim , Andi Kleen , linux-kernel Subject: Re: [PATCH v14 0/3]: perf: reduce data loss when profiling highly parallel CPU bound workloads Message-ID: <20181025085439.GA4722@krava> References: <20181015101748.GB29504@krava> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.10.1 (2018-07-13) X-Scanned-By: MIMEDefang 2.79 on 10.5.11.11 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.48]); Thu, 25 Oct 2018 08:54:44 +0000 (UTC) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 > > 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