From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1034690AbdEXQzx (ORCPT ); Wed, 24 May 2017 12:55:53 -0400 Received: from mga07.intel.com ([134.134.136.100]:9174 "EHLO mga07.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933210AbdEXQzv (ORCPT ); Wed, 24 May 2017 12:55:51 -0400 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.38,387,1491289200"; d="scan'208";a="1173825112" Date: Wed, 24 May 2017 09:55:49 -0700 From: Andi Kleen To: Vince Weaver Cc: Stephane Eranian , Peter Zijlstra , "Liang, Kan" , "mingo@redhat.com" , "linux-kernel@vger.kernel.org" , "alexander.shishkin@linux.intel.com" , "acme@redhat.com" , "jolsa@redhat.com" , "torvalds@linux-foundation.org" , "tglx@linutronix.de" Subject: Re: [PATCH 1/2] perf/x86/intel: enable CPU ref_cycles for GP counter Message-ID: <20170524165549.GB24144@tassilo.jf.intel.com> References: <1495213582-3635-1-git-send-email-kan.liang@intel.com> <20170522091916.3gydvflk4fnqkzw5@hirez.programming.kicks-ass.net> <37D7C6CF3E00A74B8858931C1DB2F077536F079F@SHSMSX103.ccr.corp.intel.com> <20170522192335.v4gvhz24ix2jeihg@hirez.programming.kicks-ass.net> <20170523063913.363ssgcy7kmeesye@hirez.programming.kicks-ass.net> <20170524154518.GA24144@tassilo.jf.intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.8.0 (2017-02-23) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org > The whole point of the rdpmc() implementation is to be low overhead. > If you have to parse 10 different mmap() fields it starts to defeat the > purpose. You would only use it with ref-cycles of course. So for the normal case there is no overhead. > If the watchdog counter is constantly running, can't you just modify > perf_event to just grab start/stop values at context switch time and > provide the difference to the user? Sort of like the "always running" > patchsets that float around? Though I guess that doesn't help much with > sampling. This wouldn't work with ring filters unfortunately. -Andi