From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751096AbdFSOJJ (ORCPT ); Mon, 19 Jun 2017 10:09:09 -0400 Received: from mga14.intel.com ([192.55.52.115]:22699 "EHLO mga14.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750811AbdFSOJI (ORCPT ); Mon, 19 Jun 2017 10:09:08 -0400 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.39,361,1493708400"; d="scan'208";a="276013197" Subject: Re: [PATCH v3 1/n] perf/core: addressing 4x slowdown during per-process profiling of STREAM benchmark on Intel Xeon Phi To: Mark Rutland Cc: Peter Zijlstra , Ingo Molnar , Arnaldo Carvalho de Melo , Alexander Shishkin , Andi Kleen , Kan Liang , Dmitri Prokhorov , Valery Cherepennikov , David Carrillo-Cisneros , Stephane Eranian , linux-kernel@vger.kernel.org References: <09226446-39b9-9bd2-d60f-b9bb947987c5@linux.intel.com> <20170615195618.GA8807@leverpostej> <07a76338-4c71-569a-d36e-7d6bcd10bd74@linux.intel.com> <20170616090938.GB20092@leverpostej> <22a2dafb-de05-199b-54ed-0c3b24349826@linux.intel.com> <20170619124639.GA3661@leverpostej> <20170619133831.GB3894@leverpostej> From: Alexey Budankov Organization: Intel Corp. Message-ID: <2c2ca95a-630f-60c4-ec71-0ec37b99105b@linux.intel.com> Date: Mon, 19 Jun 2017 17:09:00 +0300 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.1.1 MIME-Version: 1.0 In-Reply-To: <20170619133831.GB3894@leverpostej> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 19.06.2017 16:38, Mark Rutland wrote: > On Mon, Jun 19, 2017 at 01:46:39PM +0100, Mark Rutland wrote: >> On Fri, Jun 16, 2017 at 05:22:29PM +0300, Alexey Budankov wrote: >>> On 16.06.2017 17:08, Alexey Budankov wrote: >>>> On 16.06.2017 12:09, Mark Rutland wrote: >>>>> There's a --per-thread option to ask perf record to not duplicate the >>>>> event per-cpu. >>>>> >>>>> If you use that, what amount of slowdown do you see? >>> >>> After applying all three patches: >>> >>> - system-wide collection: >>> >>> [ perf record: Woken up 1 times to write data ] >>> [ perf record: Captured and wrote 303.795 MB perf.data (~13272985 samples) ] >>> 2162.08user 176.24system 0:12.97elapsed 18021%CPU (0avgtext+0avgdata >>> 1187208maxresident)k >>> 0inputs+622624outputs (0major+1360285minor)pagefaults 0swaps >>> >>> - per-process collection: >>> >>> [ perf record: Woken up 5 times to write data ] >>> [ perf record: Captured and wrote 1.079 MB perf.data (~47134 samples) ] >>> 2102.39user 153.88system 0:12.78elapsed 17645%CPU (0avgtext+0avgdata >>> 1187156maxresident)k >>> 0inputs+2272outputs (0major+1181660minor)pagefaults 0swaps >>> >>> Elapsed times look similar. Data file sizes differ significantly. >> >> Interesting. I wonder if that's because we're losing samples due to >> hammering the rb, or if that's a side-effect of this patch. >> >> Does perf report describe any lost chunks? >> >> For comparison, can you give --per-thread a go prior to these patches >> being applied? > > FWIW, I had a go with (an old) perf record on an arm64 system using > --per-thread, and I see that no samples are recorded, which seems like a > bug. > > With --per-thread, the slwodown was ~20%, whereas with the defaults it > was > 400%. That looks similar to what I am observing in per-process single thread profiling >4x slowdown. > > Thanks, > Mark. >