Re: [PATCH 2/3] ring-buffer: try to discard unneeded timestamps

From: Steven Rostedt
Date: Wed Jun 03 2009 - 15:14:21 EST



On Wed, 3 Jun 2009, Tim Bird wrote:
>
> Is this new routine only for discarding uncommitted events,
> or can it be used on committed events?
>
> I assume the former, since I see nothing about adjusting the
> commit position.

Only uncommitted events.

>
> In the ring_buffer API I see that there's a function for
> discarding events (committed ones), but not for free-ing them.
> In function duration filtering, it is desirable to free the
> last committed event, which for a function exit of short
> duration will be it's entry event 99% of the time.

In filtering we deside before commiting if we want to discard or not.
(Note, this is only in tip right now.) Once we commit it, there is no way
to safely remove it from the ring buffer. Additions of items are not under
a lock (only the moving from page to page is).

For the event tracer we check if we want to disard it or not before we
commit.

>
> P.S. I'm very sorry about the missing '>' on the Signed-off-by line.
> I ran checkpatch and got a passing score, but missed this.

No prob, you only made me spam LKML (and others) with about 10 gargage
emails ;-)

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