Re: [RFC PATCH 1/2 v2] Unified trace buffer

From: Steven Rostedt
Date: Thu Sep 25 2008 - 13:46:48 EST




On Thu, 25 Sep 2008, Linus Torvalds wrote:
> On Thu, 25 Sep 2008, Steven Rostedt wrote:
> >
> > The problem with this is overwrite mode, which is the only mode ftace
> > currently offers. What happens when your writer starts overwriting the
> > ring buffer and there is no reader?
>
> Overwrite things on page at a time. Don't you already do that? (I didn't
> check that closely, I just assumed you would do the _much_ simpler "move
> the head to the next page" thing rather than trying to mix head and tail
> on the same page.

Yeah, I decided to do the blast the page instead of just blast the entry.
This keeps complexity a hell of a lot simpler.

>
> > What happens is that the start value is gone. You do not have a way to use
> > all the deltas to catch up to the remaining events.
>
> Use the page start date for the first event in a page. But within pages,
> make everything depend on previous event.

Hmm, I'm confused. I do this already. I put the page start time on each
page already. The events on the page are based on the page start time
itself. The iterator, or writer, keeps track of the last event. When it
reaches a new page, it reads the new time stamp of the page and starts
incrementing against that.

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