Messages in this thread | | | Date | Tue, 9 Jul 2013 16:31:50 +0200 | From | Peter Zijlstra <> | Subject | Re: [PATCH] perf: Update event buffer tail when overwriting old events |
| |
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.
| |