On Fri, 2010-03-05 at 17:46 +0100, Robert Richter wrote:
> On 26.02.10 15:51:04, Andi Kleen wrote:
> > That said the biggest problem with oprofile right now that the
> > new buffer it's using is quite a lot less reliable and drops
> > events left and right on any non trivial load. That makes
> > oprofile very unreliable, especially in call graph mode.
> (cc'ing Steve)
> the tests I run with oprofile do not indicate unreliable ring_buffer
> behavior. Maybe my use cases and loads are different. Can you describe
> a setup where this may happen for sure? What is the impact, do you
> have lost samples or inconsistent buffer data? Is the data loss in
> kernel or user space? Also, I am not aware that the ring_buffer is
> unreliable for ftrace or tracepoints, where it is heavily used. I
> really want to find the root cause here.
Yes, the ftrace ring buffer (which I believe oprofile now uses) is
lockless and re-entrant. That means if a interrupt goes off while one
event is being recorded, and that interrupt writes to the same ring
buffer, the ring buffer will be able to record it without dropping the
As long as the readers keep up, no event will ever be dropped. Perhaps
you need to increase the size of the ring buffers?