Re:Wait-free queueing and ultra-low latency logging
by easytiger on Thursday May 29, 2014 @06:34AM
(#7815579)
I wonder about the implementation of the ringbuffer itself. Would boost::spsc_queue be suitable for a similar task?
[ Parent
| on HN ]
Re:Wait-free queueing and ultra-low latency logging
by mortoray on Thursday May 29, 2014 @06:39AM
(#7815586)
That definitely looks like it's providing the same functionality my ring buffer did. It's impossible to say whether it is as efficient as mine was without profiling it. It's possible. Even if it's almost as efficient, or even half as efficient, I'd still consider using it. Writing this stuff consumes a lot of time.
I notice the newest versions of this class added a "consume" function. I assume it's for the same reason my class did it. Instead of pushing/popping you can directly modify memory in the ring buffer. This avoids one copy operation.
Re:Wait-free queueing and ultra-low latency logging
by easytiger on Thursday May 29, 2014 @08:29AM
(#7815861)
interesting, i've actually been oblivious to the mechanics when i'm using it (too much business logic to do).
I'm also using it and burning a whole core doing a busy wait. I was going to try and fix this but i'm not sure how much i care. if we aren't paying for cpu time then it doesn't matter