Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933581AbcKWWD3 convert rfc822-to-8bit (ORCPT ); Wed, 23 Nov 2016 17:03:29 -0500 Received: from mga05.intel.com ([192.55.52.43]:31373 "EHLO mga05.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933083AbcKWWD1 (ORCPT ); Wed, 23 Nov 2016 17:03:27 -0500 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.31,540,1473145200"; d="scan'208";a="904896236" From: "Liang, Kan" To: Andi Kleen CC: "peterz@infradead.org" , "mingo@redhat.com" , "acme@kernel.org" , "linux-kernel@vger.kernel.org" , "alexander.shishkin@linux.intel.com" , "tglx@linutronix.de" , "namhyung@kernel.org" , "jolsa@kernel.org" , "Hunter, Adrian" , "wangnan0@huawei.com" , "mark.rutland@arm.com" Subject: RE: [PATCH 13/14] perf tools: warn on high overhead Thread-Topic: [PATCH 13/14] perf tools: warn on high overhead Thread-Index: AQHSRceuLhUOko8nHEi60IVVyC3GlaDnDu1Q Date: Wed, 23 Nov 2016 22:03:24 +0000 Message-ID: <37D7C6CF3E00A74B8858931C1DB2F07750CA27D8@SHSMSX103.ccr.corp.intel.com> References: <1479894292-16277-1-git-send-email-kan.liang@intel.com> <1479894292-16277-14-git-send-email-kan.liang@intel.com> <87d1hmx7tn.fsf@tassilo.jf.intel.com> In-Reply-To: <87d1hmx7tn.fsf@tassilo.jf.intel.com> Accept-Language: zh-CN, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-titus-metadata-40: eyJDYXRlZ29yeUxhYmVscyI6IiIsIk1ldGFkYXRhIjp7Im5zIjoiaHR0cDpcL1wvd3d3LnRpdHVzLmNvbVwvbnNcL0ludGVsMyIsImlkIjoiN2VjMDgyYTItNDNlZi00N2QyLTkyNzctNzNhNGE1MDYxYzMzIiwicHJvcHMiOlt7Im4iOiJDVFBDbGFzc2lmaWNhdGlvbiIsInZhbHMiOlt7InZhbHVlIjoiQ1RQX0lDIn1dfV19LCJTdWJqZWN0TGFiZWxzIjpbXSwiVE1DVmVyc2lvbiI6IjE1LjkuNi42IiwiVHJ1c3RlZExhYmVsSGFzaCI6InRxSzdVcVV6dUN4SWFMdlNHb1Q5Y1IrMFhka3BDR0ZvOXJtTHRkbkxiYW89In0= x-ctpclassification: CTP_IC x-originating-ip: [10.239.127.40] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 8BIT MIME-Version: 1.0 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 993 Lines: 34 > > kan.liang@intel.com writes: > > > From: Kan Liang > > > > The rough overhead rate can be caculated by the sum of all kinds of > > overhead / elapsed time. > > If the overhead rate is higher than 10%, warning the user. > > Thinking about this more: this is comparing the cost of a single CPU to the > total wall clock time. This isn't very good and can give confusing results with > many cores. > > Perhaps we need two separate metrics here: > > - cost of perf record on its CPU (or later on if it gets multi threaded > more multiple). Warn if this is >50% or so. What's the formula for cost of perf record on its CPU? The cost only includes user space overhead or all overhead? What is the divisor? > - average perf collection overhead on a CPU. The 10% threshold here > seems appropiate. For the average, do you mean add all overheads among CPUs together and divide the CPU#? To calculate the rate, the divisor is wall clock time, right? Thanks, Kan