[Sheepdog] [PATCH v2 09/13] trace: add a ring buffer

Steven Dake sdake at redhat.com
Sun Feb 19 14:58:49 CET 2012


On 02/16/2012 08:33 PM, Liu Yuan wrote:
> On 02/16/2012 11:40 PM, Steven Dake wrote:
> 
>> Have a look at the ring buffer in libqb.  (http://www.libqb.org).  It
>> allows arbitrary sized ring buffers with arbitrary sized blocks of data
>> (rather then pointers as in this implementation).
>>
> 
> 
> I think libqb is kind of overkill for trace buffer. Simple ring buffer
> will suffice for the sheepdog trace data buffering currently.
> 
>> There is also tracing/logging in this library, but you may be more
>> interested in the on/off model vs the always-on model imposed by libqb.
>>  (Even though the always-on model is very low overhead).
> 
> 
> Libqb is very powerful at logging, but not at tracing. It doesn't
> provide ftrace-like dynamic code patching for accounting the CPU usage
> at function granularity.
> 
> Current sheepdog's logging system is sync logging, I have considered it
> to replace the sheepdog's current logging system to gain async logging
> for better performance, lower overhead. But I found that libqb does much
> more than logging, and the LOC of code base is even more than sheep's.
> So we are considering to add async capability to the current logging
> system instead of replacing it completely.
> 

Also has a nice flight recorder.

But I hear you on LOC issue. In any regard keep it in mind for future
projects.  I am using for pacemaker cloud, and have found it really
rocks and thus far haven't found any bugs (which is surprising).

Regards
-steve

> Thanks,
> Yuan
> 




More information about the sheepdog mailing list