Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753263AbbFDMao (ORCPT ); Thu, 4 Jun 2015 08:30:44 -0400 Received: from mail-wg0-f50.google.com ([74.125.82.50]:36632 "EHLO mail-wg0-f50.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752009AbbFDMan (ORCPT ); Thu, 4 Jun 2015 08:30:43 -0400 Message-ID: <557044ED.8060508@gmail.com> Date: Thu, 04 Jun 2015 14:30:37 +0200 From: Imre Palik User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.7.0 MIME-Version: 1.0 To: Peter Zijlstra CC: Thomas Gleixner , "H. Peter Anvin" , x86@kernel.org, Paul Mackerras , Ingo Molnar , Arnaldo Carvalho de Melo , linux-kernel@vger.kernel.org, "Palik, Imre" , Anthony Liguori Subject: Re: [RFC PATCH] perf: honoring cpuid for number of fixed counters References: <1433318628-6330-1-git-send-email-imrep.amz@gmail.com> <20150603083615.GZ3644@twins.programming.kicks-ass.net> <557029DC.6080201@gmail.com> <20150604114917.GI3644@twins.programming.kicks-ass.net> In-Reply-To: <20150604114917.GI3644@twins.programming.kicks-ass.net> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1231 Lines: 29 On 06/04/15 13:49, Peter Zijlstra wrote: > On Thu, Jun 04, 2015 at 12:35:08PM +0200, Imre Palik wrote: >> On 06/03/15 10:36, Peter Zijlstra wrote: >>> Further, the Intel Arch PerfMon v2 spec actually specifies there to be 3 >>> fixed function counters. >>> >>> So anything that says it is v2+ and does not have the 3, is non >>> compliant. >>> >>> I would suggest you go fix your hypervisor. >> >> If I set up the hypervisor to advertise Arch PerfMon v1 (0 fixed >> counters), then without my patch, perf still tries to use fixed >> counters. So something is clearly broken here. > > So the code you deleted does if (version > 1), and last I checked that > should return false if version == 1. > > So please check what's happening there first. Checked, before sent my last mail. The trouble is that the number of fixed counters is not taken into account when scheduling the events, and the cpu model based event constraints will favour fixed counters. So perf tries to use them. -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/