Re: [RFC PATCH 1/3] Unified trace buffer

From: Linus Torvalds
Date: Wed Sep 24 2008 - 12:32:25 EST




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.

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