Re: [tip:perfcounters/core] perf_counter: x86: Fix call-chain support to use NMI-safe methods

H. Peter Anvin
2009-06-16T22:42:07Z

Mathieu Desnoyers wrote:
>
> So, in summary :
>
> - near-zero measurable runtime cost.
> - NMI-reentrancy constraint on a very small and well-defined trap
> handler code path.
> - simplifies life of tracer and profilers. (meaning : makes a lot of
> _other_ kernel code much easier to write and understand)
> - removes ad-hoc corner cases management from those users.
> - provides early error detection because the nmi-reentrant code path is
> shared by all users.
>
> So I'll use your own argument : making this trap handler code path
> nmi-reentrant will simplify an already existing bunch of in-kernel users
> (oprofile, perf counter tool, ftrace..). Moving the burden from
> subsystems spread across the kernel tree to a single, well defined spot
> looks like a constraint that will _diminish_ overall kernel development
> cost.
>

No, this is utter bullshit.

YOU ARE ADDING A CONSTRAINT TO ONE OF THE HOTTEST PATHS IN THE KERNEL.

Constraining future optimizations.

To support tools.

That is what I'm objecting to.

-hpa