Re: [PATCH v6 2/2] Output stall data in debugfs

From: Alex Neronskiy
Date: Fri Aug 12 2011 - 15:46:57 EST


On Fri, Aug 12, 2011 at 2:06 AM, Ingo Molnar <mingo@xxxxxxx> wrote:
> Well, but there are conceptual problems at the higher levels: the
> concept of recording a worst-case (or best-case) latency is not
> limited to the comparatively minor usecase of soft-watchdog stalls.
>
> We have numerous tracers in ftrace that output their own kinds of
> min/max latencies, with associated stack trace signatures.
>
> So the right approach would *not* be to add yet another
> special-purpose debugfs variant for this, but to integrate this
> capability into perf tracing. That way it would be useful for:
>
>  - soft stalls
>  - irq service latencies
>  - irq disable latencies
>  - preempt disable latencies
>  - wakeup latencies
>  - and much more: it could be used for just about any event that
>   measures some sort of latency.
>
> To implement it i'd first suggest to add a TRACE_EVENT() for the
> softwatchdog latencies, and then look at how a stack-trace attached
> to the worst-case latency could be emitted via the perf ring-buffer.
>
> We do something very, very similar for callchains already, so all the
> low level machinery is already there.
>
> Alex, would you be interested in taking a stab at this approach? Such
> an approach looks a *lot* more palatable from an upstream merge point
> of view and it would give you all the functionality that the current
> patches are providing you (and more).
>
> Thanks,
>
>        Ingo
The best data comes from real-world use, so we want this used in
production. We felt that ftrace would add excessive overhead and bog
down performance, whereas this random sampling approach is basically
free, especially considering it's piggybacking on watchdogs which are
already running anyway. Is our approach misguided? Is this not as
cheap as we think? Is tracing not as expensive as we think?
--
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/