On Tue, Jul 09, 2013 at 09:52:17PM +0800, Yan, Zheng wrote: > On 07/09/2013 04:05 PM, Peter Zijlstra wrote: > > On Tue, Jul 09, 2013 at 03:05:41PM +0800, Yan, Zheng wrote: > > > >> Thank you for your help. I ran the same test, the results for regular case > >> are much better. But it still has about 1% overhead, probably because we > >> enlarge the ring_buffer structure, make it less cache friendly. > >> > >> origin with the patch > >> AVG 1000 1013 > >> STDEV 13.4 15.0 > > > > And this is the !overwrite case, right? I don't suppose you cured the logic > > Namhyung Kim pointed out? That should affect the overwrite case I suppose > > since > > it won't switch to perf_event_output_overwrite(). > > yes, it's the overwrite case.
So the most common case is the !overwrite one; we should ensure no significant regression there. The overwrite case isn't used that much because as you've found its really hard to use without a valid tail pointer. So I'm not too bothered about making the overwrite case a _little_ more expensive if that makes it far more usable. -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/