linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Vince Weaver <vweaver1@eecs.utk.edu>
To: Peter Zijlstra <peterz@infradead.org>
Cc: Ingo Molnar <mingo@elte.hu>,
	Arnaldo Carvalho de Melo <acme@infradead.org>,
	linux-kernel@vger.kernel.org, Andi Kleen <ak@linux.intel.com>,
	Stephane Eranian <eranian@gmail.com>,
	Lin Ming <ming.m.lin@intel.com>,
	Arnaldo Carvalho de Melo <acme@redhat.com>,
	Thomas Gleixner <tglx@linutronix.de>
Subject: Re: [PATCH 1/1] perf tools: Add missing user space support for config1/config2
Date: Tue, 26 Apr 2011 16:33:12 -0400 (EDT)	[thread overview]
Message-ID: <alpine.DEB.2.00.1104261617320.32482@cl320.eecs.utk.edu> (raw)
In-Reply-To: <1303809958.20212.219.camel@twins>

On Tue, 26 Apr 2011, Peter Zijlstra wrote:

> > That's why people use libpfm4.  or PAPI.  And they do.
> 
> And how is typing in hex numbers different from typing in model specific
> event names? 

Reall... quick, tell me what event 0x53cf28 corresponds to on a core2.

Now if I said L2_IFETCH:BOTH_CORES you know several things about what it 
is.

Plus, you can do a quick search in the Intel Arch manual and find more 
info.  With the hex value you have to do some shifting and masking by hand 
before looking up.

An even worse problem:

Quick... tell me what actual hardware event L1-dcache-loads corresponds
to on an L2.  Can you tell without digging through kernel source code?

Does that event include prefetches?  Does it include speculative events?
Does it count page walks?  Does it overcount by an amount equal to the 
number of hardware interrupts?   If I use the equivelent event on an 
AMD64, will all the same hold?

> PAPI actually has 'generalized' events, but I guess you're going to tell
> me nobody uses those since they're not useful.

Of course people use them.  But we don't _force_ people to use them.  We 
don't disable access to raw events.  Although alarmingly it seems like the 
kernel is going to start to, possibly meaning even our users can't use our
'generalized' events if for example they incorporate OFFCORE_RESPONSE.

Another issue:  if a problem is found with one of the PAPI events, they 
can update and recompile and run out of their own account at will.

If there's a problem with a kernel generalized events, you have to 
reinstall a kernel.  Something many users can't do.  For example, your 
Nehalem cache fixes will be in 2.6.39.  How long until that appears in a 
stock distro?  How long until that appears in an RHEL release?

> > All the world is not perf.
> 
> I know, all the world is interested in investing tons of time learning
> about their one architecture and extract the last few percent of
> performance.

There are people out there who have been using perf counters on UNIX/Linux 
machines for decades.  They know what events they want to measure.  They 
are not interested in having the kernel tell them they can't do it.

> I looks like you're all so stuck in your HPC/lowlevel way of things
> you're not even realizing there's much more to be gained by providing
> easy and useful tools to the general public, stuff that works similarly
> across architectures.

We're not saying people can't use perf.  Who knows, maybe PAPI will go 
away becayse perf is so good.  It's just silly to block out access to RAW 
events on the argument that "it's too hard".  Again, are we Microsoft 
here?

> Very constructive attitude, instead of helping you simply subvert and
> route around, thanks man! 

I spent a lot of time trying to fix P4 support back in the 2.6.35 days.
I only have so much time to spend on this stuff. 

When people complain about p4 support, I direct them to Cyrill et al.  I 
can't force them to become kernel developers.  Usually they want immediate 
results, which they can get with perfctr.

People want offcore response.  People want uncore access.  People want raw 
event access.  I can tell them "send a patch to the kernel, it'll
languish in obscurity for years and maybe in 2.6.4x you'll see it".  Or 
they can have support today with an outside patch.  Which do you think 
they choose?

> And why is that? is that the lack of userspace rdpmc? That should be
> possible with perf, powerpc actually does that already. Various people
> mentioned wanting to make this work on x86 but I've yet to see a patch.

We at the PAPI project welcome any patches you'd care to contribute to our 
project too, to make things better.  It goes both ways you know.

Vince

  reply	other threads:[~2011-04-26 20:33 UTC|newest]

Thread overview: 39+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-04-21 17:41 [GIT PULL 0/1] perf/urgent Fix missing support for config1/config2 Arnaldo Carvalho de Melo
2011-04-21 17:41 ` [PATCH 1/1] perf tools: Add missing user space " Arnaldo Carvalho de Melo
2011-04-22  6:34   ` Ingo Molnar
2011-04-22  8:06     ` Ingo Molnar
2011-04-22 21:37       ` Peter Zijlstra
2011-04-22 21:54         ` Peter Zijlstra
2011-04-22 22:19           ` Peter Zijlstra
2011-04-22 23:54             ` Andi Kleen
2011-04-23  7:49               ` Peter Zijlstra
2011-04-22 22:57           ` Peter Zijlstra
2011-04-23  0:00             ` Andi Kleen
2011-04-23  7:50               ` Peter Zijlstra
2011-04-23  8:13         ` Ingo Molnar
2011-07-01 15:23         ` [tip:perf/core] perf, arch: Add generic NODE cache events tip-bot for Peter Zijlstra
2011-04-25 17:12       ` [PATCH 1/1] perf tools: Add missing user space support for config1/config2 Vince Weaver
2011-04-25 17:54         ` Ingo Molnar
2011-04-25 21:46           ` Vince Weaver
2011-04-25 22:12             ` Andi Kleen
2011-04-26  7:23               ` Ingo Molnar
2011-04-26  7:38             ` Ingo Molnar
2011-04-26 20:51               ` Vince Weaver
2011-04-27  6:52                 ` Ingo Molnar
2011-04-28 22:16                   ` Vince Weaver
2011-04-28 23:30                     ` Thomas Gleixner
2011-04-29  2:28                     ` Andi Kleen
2011-04-29 19:32                     ` Ingo Molnar
2011-04-26  9:49             ` Peter Zijlstra
2011-04-26  9:25         ` Peter Zijlstra
2011-04-26 20:33           ` Vince Weaver [this message]
2011-04-26 21:19             ` Cyrill Gorcunov
2011-04-26 21:25               ` Don Zickus
2011-04-26 21:33                 ` Cyrill Gorcunov
2011-04-27  6:43             ` Ingo Molnar
2011-04-28 22:10               ` Vince Weaver
2011-04-22 16:22     ` Andi Kleen
2011-04-22 19:54       ` Ingo Molnar
2011-04-22  8:47 Stephane Eranian
2011-04-22  9:23 ` Ingo Molnar
2011-04-22  9:41   ` Stephane Eranian

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=alpine.DEB.2.00.1104261617320.32482@cl320.eecs.utk.edu \
    --to=vweaver1@eecs.utk.edu \
    --cc=acme@infradead.org \
    --cc=acme@redhat.com \
    --cc=ak@linux.intel.com \
    --cc=eranian@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=ming.m.lin@intel.com \
    --cc=mingo@elte.hu \
    --cc=peterz@infradead.org \
    --cc=tglx@linutronix.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).