[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <alpine.DEB.1.10.0809241229380.5017@gandalf.stny.rr.com>
Date: Wed, 24 Sep 2008 12:31:04 -0400 (EDT)
From: Steven Rostedt <rostedt@...dmis.org>
To: Mathieu Desnoyers <compudj@...stal.dyndns.org>
cc: Martin Bligh <mbligh@...gle.com>,
Peter Zijlstra <peterz@...radead.org>,
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,
Linus Torvalds <torvalds@...ux-foundation.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, Mathieu Desnoyers wrote:
> /*
> * Perform an aligned write of the input data into the buffer.
> *
> * buffer : page pointer array
> * woffset : offset in the page pointer array where write starts from
> * data : input data
> * len : length of data to copy
> *
> * Note : if a NULL buffer is passed, no copy is performed, but the
> * alignment and offset calculation is done. Useful to calculate the
> * size to reserve.
> *
> * return : length written
> */
> size_t write(struct page **buffer, size_t woffset, void *data, size_t len);
>
> Therefore, we could have code which writes in the buffers, without extra
> copy, and without using vmap, in multiple writes for a single event,
> which would deal with data alignment, e.g. :
>
> size_t woffset, evsize = 0;
>
> evsize += write(NULL, evsize, &var1, sizeof(var1));
> evsize += write(NULL, evsize, &var2, sizeof(var2));
> evsize += write(NULL, evsize, &var3, sizeof(var3));
>
> woffset = reserve(..., evsize);
>
> woffset += write(buffer, woffset, &var1, sizeof(var1));
> woffset += write(buffer, woffset, &var2, sizeof(var2));
> woffset += write(buffer, woffset, &var3, sizeof(var3));
>
> commit(..., evsize);
>
> Does that make sense ?
Mathieu,
I'm starting to think that you are just too smart for your own good ;-)
No it does not make sense. Well, it does not after looking at it for 10
seconds.
Which brings up my point, the interface must be simple, and not cause
people to spend minutes trying to figure out what the trace is doing.
-- 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