Re: [RFC] Unified Ring Buffer (Next Generation)

From: Steven Rostedt
Date: Wed May 19 2010 - 15:38:43 EST


On Wed, 2010-05-19 at 21:25 +0200, Andi Kleen wrote:

> > Perhaps, but the goal is actually to handle all the features of perf and
> > ftrace in a generic fashion.
>
> Ok so your goal is to only cover perf and ftrace and let all
> the other users be alone?
>

Yes, my goal is to unify perf and ftrace, but that's because that is
what I am working most on.

> >
> > You also bring up a point that I try very hard to get across. When
> > people think of a ring buffer, they think of the ones that they created
> > in CS101, not realizing that when you are dealing with production
> > systems, handling the requirements makes the buffering much more
> > complex.
>
> For most users the simple ones are totally adequate though.
>
> > Perhaps the answer is we are fine with more than one ring buffer. I'm OK
>
> That's what we already have in fact: kfifo, ftrace, perf, a couple
> of private ones all over.
>
> I think a couple of private ones could be converted to kfifo
> (I did some of that for my own code)
>
> But I don't really see how you can marry the simple kfifo world
> to the highend bells'n'whistles ftrace world. And even in the highend
> world there might be space for multiple specialized ones.
>
> On the other hand if the highend world had less overhead
> then at least some of the "higher end" kfifo users could start
> considering to use it.

If Mathieu can pull off the requirements that can handle all of ftrace
and perf in a light weight manner, then great. But if the end result is
still to much for these "private" users, then we should have a
"ring_buffer_lite", and perhaps even base it off of a kfifo itself.

Note, it would be nice to have a single location that (a) ring buffer(s)
reside at. This way if a developer has a need for a ring buffer then
they can have a single location to look for one.

Maybe the ring buffer code should go in lib/ringbuffers/ instead of
kernel/ringbuffer/.

-- Steve


--
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/