Received: by 2002:ac0:a5a6:0:0:0:0:0 with SMTP id m35-v6csp359267imm; Wed, 29 Aug 2018 01:42:30 -0700 (PDT) X-Google-Smtp-Source: ANB0VdajVH9Tx9OWH6sKGp6Zwkf1i74eoKpe55TkDDDJVK3ev36gddcOfLO/IfMlFns0/1QGQe0c X-Received: by 2002:a63:5964:: with SMTP id j36-v6mr4830136pgm.222.1535532150794; Wed, 29 Aug 2018 01:42:30 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1535532150; cv=none; d=google.com; s=arc-20160816; b=xgjonnHyYIAC0Wz4iuaiUlyP+LPdT2KTTYHSSwkzmme8bq3/O17KFdTaGUkGSJsUdT SXbEcs+/5dw6V24RYViTs18yuVAvmrnkKW4qSapwX4KztcUt+W8eD6IOOI0m/7+PYZM9 keRTrZg4uUh2qXcdTFCQwFScaXn9PHlqMuSI4/aovL72eFmLYlHOUY3W/Gb7ELdbrPkE wt1T2CHd6cI5JpdEws8RTs/gc4QtVle+GxW2BBNhtn0Mh1BlhQNrx7I68ndhB1s5gn8t zr+1geX6tDzJTWKgvNDNzDr7bCLyJsq/XI136olG5XcuWL7CIgmlA6aQy+m+qLNa2csT y48Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:organization:from:references:cc:to:subject :arc-authentication-results; bh=ag662vABnAFRyZ70ESIvPZXY+C9z6PTQhvgwn/NmRD4=; b=SETn6l6EUCLuK8WKMafISjiKnLTMAgGdETpfqWLKJvOznK7xGF/NkWEDUhGYUuXtwN 6YDYlL4qvbii6M2U8VwVH4yKcCrPLjnWOYlLt4/o+ykmdVzTg4/awPVS5nDT/TT4zOYK 8NbQETdNZQqFNMlekOkJAzgRwdUwHG7e0whZdlWrIeI55aPg+6GzA/whBz09uwAKmeSH 5pmQe7fheyul2fCGOONhmIq7tACyxIpPC2VBB0p0mFftvqAo+Teh62989Wtnlrdouau4 f8OAIClmAEUEE04hskXUwaj+Ed8+jG4kYdDQkULISwu+ugNNSQk2bqyIYUEsljDdDMs/ OtnQ== 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=intel.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id k1-v6si3179684pgh.65.2018.08.29.01.42.15; Wed, 29 Aug 2018 01:42:30 -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=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727860AbeH2Mgz (ORCPT + 99 others); Wed, 29 Aug 2018 08:36:55 -0400 Received: from mga12.intel.com ([192.55.52.136]:6798 "EHLO mga12.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726507AbeH2Mgz (ORCPT ); Wed, 29 Aug 2018 08:36:55 -0400 X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga004.jf.intel.com ([10.7.209.38]) by fmsmga106.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 29 Aug 2018 01:41:06 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.53,301,1531810800"; d="scan'208";a="228544097" Received: from linux.intel.com ([10.54.29.200]) by orsmga004.jf.intel.com with ESMTP; 29 Aug 2018 01:40:48 -0700 Received: from [10.125.252.129] (abudanko-mobl.ccr.corp.intel.com [10.125.252.129]) by linux.intel.com (Postfix) with ESMTP id BCD545802AD; Wed, 29 Aug 2018 01:40:46 -0700 (PDT) Subject: Re: [PATCH v4 0/2]: perf: reduce data loss when profiling highly parallel CPU bound workloads To: Kim Phillips Cc: Ingo Molnar , Peter Zijlstra , Arnaldo Carvalho de Melo , Alexander Shishkin , Jiri Olsa , Namhyung Kim , Andi Kleen , linux-kernel References: <74fbcac7-80af-fcf0-2666-adefca98c271@linux.intel.com> <20180828144317.8684910d2b7abc9d6dca70f6@arm.com> From: Alexey Budankov Organization: Intel Corp. Message-ID: <9fcb59e7-6c26-33ad-172f-1d6b21b28f72@linux.intel.com> Date: Wed, 29 Aug 2018 11:40:44 +0300 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.9.1 MIME-Version: 1.0 In-Reply-To: <20180828144317.8684910d2b7abc9d6dca70f6@arm.com> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Kim, On 28.08.2018 22:43, Kim Phillips wrote: > On Tue, 28 Aug 2018 18:44:57 +0300 > Alexey Budankov wrote: > >> 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%: > > So I took these two patches for a quick test-drive on intel-pt. Thanks for testing that out in this scenario! It hasn't been tested yet. > > BEFORE (acme's today's perf/core branch): > > $ sudo perf version > perf version 4.18.rc7.g55fc647 > $ sudo perf record -e intel_pt// dd if=/dev/zero of=/dev/null count=100000 > 100000+0 records in > 100000+0 records out > 51200000 bytes (51 MB, 49 MiB) copied, 0.0868081 s, 590 MB/s > [ perf record: Woken up 21 times to write data ] > [ perf record: Captured and wrote 41.302 MB perf.data ] > $ > > AFTER (== BEFORE + these two patches): > > $ sudo ./perf version > perf version 4.18.rc7.gbc1c99 > $ sudo perf record -e intel_pt// dd if=/dev/zero of=/dev/null count=100000 > 100000+0 records in > 100000+0 records out > 51200000 bytes (51 MB, 49 MiB) copied, 0.0931142 s, 550 MB/s > > ...and it's still running, minutes afterwards. Before I kill it, > here's some strace output: > > nanosleep({tv_sec=0, tv_nsec=500000}, NULL) = 0 > lseek(3, 332556518, SEEK_SET) = 332556518 > write(3, "D\0\0\0\0\0\10\0", 8) = 8 > lseek(3, 0, SEEK_CUR) = 332556526 > futex(0x7f221e7252c8, FUTEX_WAKE_PRIVATE, 1) = 1 > futex(0x7f221e725200, FUTEX_WAKE_PRIVATE, 1) = 1 > futex(0x7f221e7252cc, FUTEX_WAKE_PRIVATE, 1) = 1 > futex(0x7f221e725200, FUTEX_WAKE_PRIVATE, 1) = 1 > futex(0x7f221e7252c8, FUTEX_WAKE_PRIVATE, 1) = 1 > futex(0x7f221e725200, FUTEX_WAKE_PRIVATE, 1) = 1 > futex(0x7f221e7252cc, FUTEX_WAKE_PRIVATE, 1) = 1 > futex(0x7f221e725200, FUTEX_WAKE_PRIVATE, 1) = 1 > futex(0x7f221e7252c8, FUTEX_WAKE_PRIVATE, 1) = 1 > futex(0x7f221e725200, FUTEX_WAKE_PRIVATE, 1) = 1 > futex(0x7f221e7252cc, FUTEX_WAKE_PRIVATE, 1) = 1 > futex(0x7f221e725200, FUTEX_WAKE_PRIVATE, 1) = 1 > futex(0x7f221e7252c8, FUTEX_WAKE_PRIVATE, 1) = 1 > futex(0x7f221e725200, FUTEX_WAKE_PRIVATE, 1) = 1 > nanosleep({tv_sec=0, tv_nsec=500000}, NULL) = 0 > lseek(3, 332578462, SEEK_SET) = 332578462 > write(3, "D\0\0\0\0\0\10\0", 8) = 8 > lseek(3, 0, SEEK_CUR) = 332578470 > futex(0x7f221e7252cc, FUTEX_WAKE_PRIVATE, 1) = 1 > futex(0x7f221e725200, FUTEX_WAKE_PRIVATE, 1) = 1 > nanosleep({tv_sec=0, tv_nsec=500000}, NULL) = 0 > lseek(3, 332598822, SEEK_SET) = 332598822 > write(3, "D\0\0\0\0\0\10\0", 8) = 8 > lseek(3, 0, SEEK_CUR) = 332598830 > futex(0x7f221e7252c8, FUTEX_WAKE_PRIVATE, 1) = 1 > futex(0x7f221e725200, FUTEX_WAKE_PRIVATE, 1) = 1 > futex(0x7f221e7252cc, FUTEX_WAKE_PRIVATE, 1) = 1 > futex(0x7f221e725200, FUTEX_WAKE_PRIVATE, 1) = 1 > futex(0x7f221e7252c8, FUTEX_WAKE_PRIVATE, 1) = 1 > futex(0x7f221e725200, FUTEX_WAKE_PRIVATE, 1) = 1 > futex(0x7f221e7252cc, FUTEX_WAKE_PRIVATE, 1) = 1 > futex(0x7f221e725200, FUTEX_WAKE_PRIVATE, 1) = 1 > futex(0x7f221e7252c8, FUTEX_WAKE_PRIVATE, 1) = 1 > futex(0x7f221e725200, FUTEX_WAKE_PRIVATE, 1) = 1 > futex(0x7f221e7252cc, FUTEX_WAKE_PRIVATE, 1) = 1 > ^Cstrace: Process 3597 detached > > I can't prove that it's these two patches that create the hang, but > this does look like a livelock situation...hm, hitting ^C doesn't stop > it...had to kill -9 it...erm, does 'perf record -e intel_pt// dd...' > work for you on a more standard machine?: > > $ dmesg | grep Perf > [ 0.044226] Performance Events: PEBS fmt3+, Skylake events, 32-deep LBR, full-width counters, Intel PMU driver. Strace patterns look similar to the ones implemented in the patches. Let me reproduce and investigate the hang locally. Thanks, Alexey > > Thanks, > > Kim >