Re: [PATCH 1/2] perf: ignore LBR and offcore_rsp.

2014-06-23 Thread Andi Kleen
Peter Zijlstra writes: > > So I really hate this patch, it makes the code hideous. Also, its a > death by a thousand cuts adding endless branches in this code. FWIW compared to the cost of a RDMSR (which is a very complex operation for the CPU) the cost of a predicted branch is nearly in the noi

Re: [PATCH 1/2] perf: ignore LBR and offcore_rsp.

2014-06-23 Thread Peter Zijlstra
On Wed, Jun 18, 2014 at 03:52:55PM +, Liang, Kan wrote: > diff --git a/arch/x86/kernel/cpu/perf_event.h > b/arch/x86/kernel/cpu/perf_event.h > index 3b2f9bd..f828ddd 100644 > --- a/arch/x86/kernel/cpu/perf_event.h > +++ b/arch/x86/kernel/cpu/perf_event.h > @@ -555,8 +555,9 @@ static inline voi

Re: [PATCH 1/2] perf: ignore LBR and offcore_rsp.

2014-06-23 Thread Peter Zijlstra
On Thu, Jun 19, 2014 at 10:52:52AM -0700, Andi Kleen wrote: > Andi Kleen writes: > >> > >>> Signed-off-by: Kan Liang > >> > >> And here I thought that Andi was of the opinion that if you set CPUID to > >> indicate a particular CPU you had better also handle all its MSRs. > > > > Yes, philosop

Re: [PATCH 1/2] perf: ignore LBR and offcore_rsp.

2014-06-19 Thread Andi Kleen
Andi Kleen writes: >> >>> Signed-off-by: Kan Liang >> >> And here I thought that Andi was of the opinion that if you set CPUID to >> indicate a particular CPU you had better also handle all its MSRs. > > Yes, philosophically that would be the right way, > but we needed a short term fix to sto

Re: [PATCH 1/2] perf: ignore LBR and offcore_rsp.

2014-06-18 Thread Andi Kleen
Peter Zijlstra writes: > > This order indicates Andi is the author; but there's no corresponding > From. I wrote an early version of the patch, but Kan took it over and extended it. So both are authors. BTW Kan you may want to use git send-email to get standard format. > >> Signed-off-by: K

Re: [PATCH 1/2] perf: ignore LBR and offcore_rsp.

2014-06-18 Thread Peter Zijlstra
On Wed, Jun 18, 2014 at 03:52:55PM +, Liang, Kan wrote: > perf ignore LBR and offcore_rsp. > > x86, perf: Protect LBR and offcore rsp against KVM lying > > With -cpu host, KVM reports LBR and offcore support, if the host has > support. > When the guest perf driver tries to ac