Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S935296AbcKWUZK (ORCPT ); Wed, 23 Nov 2016 15:25:10 -0500 Received: from mga05.intel.com ([192.55.52.43]:12557 "EHLO mga05.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933402AbcKWUZJ (ORCPT ); Wed, 23 Nov 2016 15:25:09 -0500 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.31,539,1473145200"; d="scan'208";a="1063409526" From: Andi Kleen To: kan.liang@intel.com 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, adrian.hunter@intel.com, wangnan0@huawei.com, mark.rutland@arm.com Subject: Re: [PATCH 13/14] perf tools: warn on high overhead References: <1479894292-16277-1-git-send-email-kan.liang@intel.com> <1479894292-16277-14-git-send-email-kan.liang@intel.com> Date: Wed, 23 Nov 2016 12:25:08 -0800 In-Reply-To: <1479894292-16277-14-git-send-email-kan.liang@intel.com> (kan liang's message of "Wed, 23 Nov 2016 04:44:51 -0500") Message-ID: <87d1hmx7tn.fsf@tassilo.jf.intel.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.5 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 656 Lines: 20 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. - average perf collection overhead on a CPU. The 10% threshold here seems appropiate. -Andi