[Sheepdog] [PATCH v2 09/13] trace: add a ring buffer
namei.unix at gmail.com
Fri Feb 17 04:33:15 CET 2012
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.
More information about the sheepdog