[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <alpine.DEB.1.10.0809241231520.5017@gandalf.stny.rr.com>
Date: Wed, 24 Sep 2008 12:37:01 -0400 (EDT)
From: Steven Rostedt <rostedt@...dmis.org>
To: Linus Torvalds <torvalds@...ux-foundation.org>
cc: Peter Zijlstra <peterz@...radead.org>,
Martin Bligh <mbligh@...gle.com>, linux-kernel@...r.kernel.org,
Ingo Molnar <mingo@...e.hu>,
Thomas Gleixner <tglx@...utronix.de>,
Andrew Morton <akpm@...ux-foundation.org>,
prasad@...ux.vnet.ibm.com,
Mathieu Desnoyers <compudj@...stal.dyndns.org>,
"Frank Ch. Eigler" <fche@...hat.com>,
David Wilder <dwilder@...ibm.com>, hch@....de,
Tom Zanussi <zanussi@...cast.net>,
Steven Rostedt <srostedt@...hat.com>
Subject: Re: [RFC PATCH 1/3] Unified trace buffer
On Wed, 24 Sep 2008, Linus Torvalds wrote:
>
>
> On Wed, 24 Sep 2008, Peter Zijlstra wrote:
> >
> > So when we reserve we get a pointer into page A, but our reserve length
> > will run over into page B. A write() method will know how to check for
> > this and break up the memcpy to copy up-to the end of A and continue
> > into B.
>
> I would suggest just not allowing page straddling.
>
> Yeah, it would limit event size to less than a page, but seriously, do
> people really want more than that? If you have huge events, I suspect it
> would be a hell of a lot better to support some kind of indirection
> scheme than to force the ring buffer to handle insane cases.
>
> Most people will want the events to be as _small_ as humanly possible. The
> normal event size should hopefully be in the 8-16 bytes, and I think the
> RFC patch is already broken because it allocates that insane 64-bit event
> counter for things. Who the hell wants a 64-bit event counter that much?
> That's broken.
The event counter is just the timestamp (quick patch, simple to fix). The
term "counter" was bad. It should have been timestamp, which one would
want a 64bit timestamp. Or at least a way to figure it out. Yes, we can
store a special event called "timestamp" and have a smaller counter. But
for simplicity, the 64 bit was easy. The event id was just 16 bits, which
I think is way more than enough.
The current method has a 16 bit length as well, and prevents crossing of
page boundaries.
Other than that, I would love to have you review more of this patch.
Note, I plan on hacking the "max_event_size", and just have that be the
standard "PAGE_SIZE". If you need a preallocated storage to store events,
one could just use PAGE_SIZE and fit any event they want into it.
Thanks,
-- Steve
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists