Re: [PATCH v0 04/71] itrace: Infrastructure for instruction flowtracing units

From: Peter Zijlstra
Date: Thu Dec 19 2013 - 05:26:50 EST


On Thu, Dec 19, 2013 at 09:53:44AM +0200, Alexander Shishkin wrote:
> Peter Zijlstra <peterz@xxxxxxxxxxxxx> writes:
> > The thing is; why can't you zero-copy whatever buffer the hardware
> > writes into, into the normal buffer?
>
> I'm not sure I understand. You mean, have the buffer split between perf
> data and trace data?

Yep, I don't see any reason why this wouldn't work.

When the hardware thing sends an interrupt to notify us its buffer is
'full', stop the recorder, try to create a single record in the buffer
that's big enough + 1 page, then swizzle the hardware pages and the
buffer pages for that record, using the +1 page to page align the actual
data. Then (re)start the hardware on the 'new' pages.


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