From: Ingo Molnar <mingo@elte.hu>
To: Vince Weaver <vweaver1@eecs.utk.edu>
Cc: Arnaldo Carvalho de Melo <acme@infradead.org>,
linux-kernel@vger.kernel.org, Andi Kleen <ak@linux.intel.com>,
Peter Zijlstra <peterz@infradead.org>,
Stephane Eranian <eranian@gmail.com>,
Lin Ming <ming.m.lin@intel.com>,
Arnaldo Carvalho de Melo <acme@redhat.com>,
Thomas Gleixner <tglx@linutronix.de>,
Peter Zijlstra <a.p.zijlstra@chello.nl>
Subject: Re: [PATCH 1/1] perf tools: Add missing user space support for config1/config2
Date: Tue, 26 Apr 2011 09:38:47 +0200 [thread overview]
Message-ID: <20110426073847.GB30630@elte.hu> (raw)
In-Reply-To: <alpine.DEB.2.00.1104251736220.12389@cl320.eecs.utk.edu>
* Vince Weaver <vweaver1@eecs.utk.edu> wrote:
> On Mon, 25 Apr 2011, Ingo Molnar wrote:
>
> >
> > * Vince Weaver <vweaver1@eecs.utk.edu> wrote:
> >
> > > [...] The kernel has no business telling users which perf events are
> > > interesting, or limiting them! [...]
> >
> > The policy is very simple and common-sense: if a given piece of PMU
> > functionality is useful enough to be exposed via a raw interface, then
> > it must be useful enough to be generalized as well.
>
> what does that even mean? How do you "generalize" a functionality like
> writing a value to an auxiliary MSR register?
Here are a few examples:
- the pure act of task switching sometimes involves writing to MSRs. How is it
generalized? The concept of 'processes/threads' is offered to user-space and
thus this functionality is generalized - the raw MSRs are not just passed
through to user-space.
- a wide range of VMX (virtualization) functionality on Intel CPUs operates via
writing special values to specific MSR registers. How is it 'generalized'? A
meaningful, structured ABI is provided to user-space in form of the KVM
device and associated semantics. The raw MSRs are not just passed through to
user-space.
- the ability of CPUs to change frequency is offered via writing special
values to special MSRs. How is this generalized? The cpufreq subsystem
offers a frequency/cpu API and associated abstractions - the raw MSRs are
not just passed through to user-space.
- in the context of perf events we generalize the concept of an 'event' and
we abstract out common, CPU model neutral CPU hardware concepts like
'cycles', 'instructions', 'branches' and a simplified cache hierarchy - and
offer those events as generic events to user-space. We do not just pass the
raw MSRs through to user-space.
- [ etc. - a lot of useful CPU functionality is MSR driven, the PMU is nothing
special there. ]
The kernel development process is in essence an abstraction engine, and if you
expect something else you'll probably be facing a lot of frustrating episodes
in the future as well where others try to abstract out meaningful
generalizations.
Thanks,
Ingo
next prev parent reply other threads:[~2011-04-26 7:39 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 " 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 [this message]
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
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=20110426073847.GB30630@elte.hu \
--to=mingo@elte.hu \
--cc=a.p.zijlstra@chello.nl \
--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=peterz@infradead.org \
--cc=tglx@linutronix.de \
--cc=vweaver1@eecs.utk.edu \
/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
Powered by JetHome