From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756036AbdLTVl5 (ORCPT ); Wed, 20 Dec 2017 16:41:57 -0500 Received: from mga09.intel.com ([134.134.136.24]:65530 "EHLO mga09.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755638AbdLTVlz (ORCPT ); Wed, 20 Dec 2017 16:41:55 -0500 X-Amp-Result: UNSCANNABLE X-Amp-File-Uploaded: False X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.45,433,1508828400"; d="scan'208";a="3526573" Date: Wed, 20 Dec 2017 13:41:47 -0800 From: Andi Kleen To: kan.liang@linux.intel.com Cc: peterz@infradead.org, mingo@redhat.com, acme@kernel.org, linux-kernel@vger.kernel.org, tglx@linutronix.de, jolsa@redhat.com, eranian@google.com Subject: Re: [PATCH V2 4/4] perf/x86: fix: disable userspace RDPMC usage for large PEBS Message-ID: <20171220214147.GJ25156@tassilo.jf.intel.com> References: <1513798971-4257-1-git-send-email-kan.liang@linux.intel.com> <1513798971-4257-5-git-send-email-kan.liang@linux.intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1513798971-4257-5-git-send-email-kan.liang@linux.intel.com> User-Agent: Mutt/1.9.1 (2017-09-22) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Dec 20, 2017 at 11:42:51AM -0800, kan.liang@linux.intel.com wrote: > From: Kan Liang > > The userspace RDPMC usage never works for large PEBS since the large > PEBS is introduced by > commit b8241d20699e ("perf/x86/intel: Implement batched PEBS interrupt > handling (large PEBS interrupt threshold)") > > When the PEBS interrupt threshold is larger than one, there is no way to > get exact auto-reload times and value for userspace RDPMC. > > Disable the userspace RDPMC usage when large PEBS is enabled. The only drawback is that the event wraps quickly. I suspect in many cases it's still usable for measuring short regions. I wouldn't force disable it, just let the users deal with it. -Andi