Re: [RFC PATCH] perf: honoring cpuid for number of fixed counters

2015-06-05 Thread Imre Palik
On 06/04/15 15:29, Peter Zijlstra wrote: > On Thu, Jun 04, 2015 at 02:30:37PM +0200, Imre Palik wrote: >> 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

Re: [RFC PATCH] perf: honoring cpuid for number of fixed counters

2015-06-04 Thread Peter Zijlstra
On Thu, Jun 04, 2015 at 02:30:37PM +0200, Imre Palik wrote: > 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. Ah! so that is what your hunk b

Re: [RFC PATCH] perf: honoring cpuid for number of fixed counters

2015-06-04 Thread Imre Palik
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 do

Re: [RFC PATCH] perf: honoring cpuid for number of fixed counters

2015-06-04 Thread Peter Zijlstra
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. >

Re: [RFC PATCH] perf: honoring cpuid for number of fixed counters

2015-06-04 Thread Imre Palik
On 06/03/15 10:36, Peter Zijlstra wrote: > On Wed, Jun 03, 2015 at 10:03:48AM +0200, Imre Palik wrote: >> From: "Palik, Imre" >> >> perf doesn't seem to honor the number of fixed counters specified by cpuid >> leaf 0xa. It always assume that intel CPUs have at least 3 fixed counters. >> >> So if

Re: [RFC PATCH] perf: honoring cpuid for number of fixed counters

2015-06-03 Thread Peter Zijlstra
On Wed, Jun 03, 2015 at 10:03:48AM +0200, Imre Palik wrote: > From: "Palik, Imre" > > perf doesn't seem to honor the number of fixed counters specified by cpuid > leaf 0xa. It always assume that intel CPUs have at least 3 fixed counters. > > So if some of the fixed counters are masked out by th

[RFC PATCH] perf: honoring cpuid for number of fixed counters

2015-06-03 Thread Imre Palik
From: "Palik, Imre" perf doesn't seem to honor the number of fixed counters specified by cpuid leaf 0xa. It always assume that intel CPUs have at least 3 fixed counters. So if some of the fixed counters are masked out by the hypervisor, it still tries to check/set them. This is good for testin