Received: by 2002:ac0:aa62:0:0:0:0:0 with SMTP id w31-v6csp1612111ima; Thu, 25 Oct 2018 01:56:45 -0700 (PDT) X-Google-Smtp-Source: AJdET5fIO6t1pKG1OY8W7MVLJn5qS4CNMrTYGrHVLg2htiBWt9doCHi2CTeRUEkkxZjVqfadWcq+ X-Received: by 2002:a62:55c3:: with SMTP id j186-v6mr680108pfb.161.1540457805544; Thu, 25 Oct 2018 01:56:45 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1540457805; cv=none; d=google.com; s=arc-20160816; b=jDu5LxPb0ZCdN9ClCU5XRAaQSniafOBJA1K0M7uuTXApZvQJoAnOkjsWY9fwOAOpZW 8GNUIomKGni7aN4RUNP/tiIzjTOnreT2m1mNQg7CuFM7SP1XTwhn/1NIBQ81LOmRhP57 EApMhVUfklDPnHcbqO9HZoEImXHnQv4w+SQKSWN7k2ugpXjzGbeyHBowioAC0avxweVK JK87jo3e5aA95/XXv0V+4aTVeuaPNI7NBsL+T24tGLynv6ahWz8h592ythUyJIOIfRmc Tgt+whnzAtKH5sQH5iSdA92zefguZoY/C+dkjcIOQmmCX+6sDtr/ZZsx+UW2l6F+5Bgt R2Ww== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=cW/i7g3iHtcoUulDfVEu8JuoN819CqXBRXNaIkvNtrU=; b=m2V1W8+ZB6QjV2AEXAg4w7MP7awj6MZv9MpqeVRXbZAlHPiq1XIqb5sCcmGQGzwYEf YDjFPmzUL3lB/YIg5nJxvNceotzRraNKadAlOUrkHM+A3arICbj4lYF1j2NbW4QS5s6X H9EGzOoDgb0oVr7GdriJksv9ZeT0BxoSbjTFb5nycTir9qWMiybJvxtFv/+RezMfy+oT kSWYT1CM2lBg8TWNWM3FCENAafcb1J+/i5iKKCPMV4OBezGpNv8O8r5s9iVMWU2Qx5MM bH+rm9GR28SJ1c6grTVdkK9zCKm8czC+1/3qbrqk7IJ2eDdqUDEbj03pzTq1Qqn9zAmo L2LA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id f32-v6si6922037pgm.505.2018.10.25.01.56.29; Thu, 25 Oct 2018 01:56:45 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727021AbeJYR0c (ORCPT + 99 others); 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