Re: [PATCH 1/1] perf tools: Add missing user space support forconfig1/config2

From: Vince Weaver
Date: Mon Apr 25 2011 - 17:47:05 EST


On Mon, 25 Apr 2011, Ingo Molnar wrote:

>
> * Vince Weaver <vweaver1@xxxxxxxxxxxx> 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?

The PAPI tool was using the perf_events interface in the 2.6.39-git
kernels to collect offcore response results by properly setting the
config1 register on Nehalem and Westmere machines.

Now it has been disabled for unclear reasons.

Could you at least have some sort of relevant errno value set in this
case? It's a real pain in userspace code to try to sort out the
perf_event return values to find out if a feature is supported,
unsupported (lack of hardware), unsupported (not implemented yet),
unsupported (disabled due to whim of kernel developer), unsupported
(because you have some sort of configuration conflict).

> > [...] What is this, windows?
>
> FYI, this is how the Linux kernel has operated from day 1 on: we support
> hardware features to abstract useful highlevel functionality out of it.
> I would not expect this to change anytime soon.

I started using Linux because it actually let me use my hardware without
interfering with what I was trying to do. Not because it disabled access
to the hardware due to some perceived lack of generalization in an extra
unncessary software translation layer.

Vince
vweaver1@xxxxxxxxxxxx
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/