Received: by 2002:ac0:aa62:0:0:0:0:0 with SMTP id w31-v6csp1736605ima; Thu, 25 Oct 2018 04:13:43 -0700 (PDT) X-Google-Smtp-Source: AJdET5c4rCAkC92K0DWMGagDDyPyCdDBcAjGywmCeV4rfmwm1v9pOELrdHfdtZZ+M59JlnUcPTFc X-Received: by 2002:a62:b90f:: with SMTP id z15-v6mr1121431pfe.171.1540466023157; Thu, 25 Oct 2018 04:13:43 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1540466023; cv=none; d=google.com; s=arc-20160816; b=tuCAS2Js2bxz0Gr5kOPrwAs1nY6Tgd8AEZZkmx/mYMypQev7WGAZQ6u6HTMm5fSk05 zbq/L0writU8EFNM1ZZ+Ro14yj/+z/py6Ks8Xxd9IAFSVFuLyqv45WMFtK7ULg6EPJj+ MfOSyUGAHs4can7GoAK268xLXDozXtKrgOs9NE+/WhRQd6C/F5NqUek+pq6WaZ3rQo3R 8C6q+tkUK++TmKxo5a7w9OJYp6R+8DNsRo/JvX1ojmF8uGgvYo5KDBinRiKCbWR1JKGN gTzC20eQnrK6uwWwEsGvyVlO4KTobRGxbj0slJ0t3VTq0834MsdQ5/txT7rtP0B5QeG8 1jOw== 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:dkim-signature; bh=2iweFYOpmoi2SElqNzyZf+d/5NOA868RknJFqx/4Z0A=; b=KBrz58XyjY8PZ3pU2pqg43f0j6ajtBi47r9+JyzwTV8++K2Zm31k2sG81Rw3LzUmd8 zmDaIsMkFYGIUG7uTfMfo4PS6H3m2vUAZERsuQLOx+s3mwKF89rNBBYeD6/7wHhHiCD8 /LLd8xrruhJPmeHqBBUePxdc1FHeXiyhyp9RY7avNO0kpuT43veW/oXSy5bYtrN8vNDt HJguxAN9Ga5oQvoLibi+/HMlb+CBe4HfqUojnQFz8RnFpV0VSypeez5XTuGYK4Q+2P9T QGzpX1sX0jVxllLCewRZjkqtkEjYJxCIdl6Ni45FeTsjzsYwRY8XBeK62zqvpOESqKNB 9ZIQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=dIuAY5VI; 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=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id h33-v6si7830762plh.56.2018.10.25.04.13.27; Thu, 25 Oct 2018 04:13:43 -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; dkim=pass header.i=@kernel.org header.s=default header.b=dIuAY5VI; 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=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728148AbeJYTo6 (ORCPT + 99 others); Thu, 25 Oct 2018 15:44:58 -0400 Received: from mail.kernel.org ([198.145.29.99]:49244 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727308AbeJYTo6 (ORCPT ); Thu, 25 Oct 2018 15:44:58 -0400 Received: from jouet.infradead.org (unknown [179.97.41.186]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id D81BA2075D; Thu, 25 Oct 2018 11:12:39 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1540465960; bh=8eCAFtS3OEr+w/IQgXAQ8+ULC7/p1fVM8Joz0csrUDY=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=dIuAY5VI81zLaP63GKZ1BY8pS2Di1s4aUiaUYHrIoW6u3SXv6EQQEBZKlonzLiBwj s3+sQdN9SmQustMBEnEJTzbY438xDb6EhqOXZHfmLJAxQOq0Lb+QCkCZpc299lWf3O 0X+XmrE7Ph7pd1OPImJshf7aDlWPCxV4795ZMjlQ= Received: by jouet.infradead.org (Postfix, from userid 1000) id CC0D1142C5F; Thu, 25 Oct 2018 08:12:37 -0300 (-03) Date: Thu, 25 Oct 2018 08:12:37 -0300 From: Arnaldo Carvalho de Melo To: Jiri Olsa Cc: Alexey Budankov , 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: <20181025111237.GA3782@kernel.org> References: <20181015101748.GB29504@krava> <20181025085439.GA4722@krava> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20181025085439.GA4722@krava> X-Url: http://acmel.wordpress.com User-Agent: Mutt/1.9.2 (2017-12-15) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Em Thu, Oct 25, 2018 at 10:54:39AM +0200, Jiri Olsa escreveu: > 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 I'll try and go over it today. - Arnaldo