[bind10-dev] Lock-free data structures

Shane Kerr shane at isc.org
Fri May 24 12:36:16 UTC 2013


Michal,

On Fri, 24 May 2013 09:33:27 +0200
Michal 'vorner' Vaner <michal.vaner at nic.cz> wrote:

> I stumped onto this thing:
> http://liblfds.org/
> 
> It says it can do lock-free data structures (including queue) on many
> OSes and processors. That could be useful for our resolver work
> (possibly on the landlords-peasants model).

Interesting...

> Also, the licence seems compatible:
> 
> | There is no license. You are free to use this software in any way,
> for any | purpose. Go forth and create wealth!
> 
> Of course, I expect we'll hit an OS or processor where it does not
> work. But I guess we could wrap it in some thin layer and replace it
> with std::queue with mutex on such combination.

Looking at the benchmark database of lfds:

http://www.liblfds.org/mediawiki/index.php?title=r6:Benchmark_Database

It doesn't seem to have very good scaling properties, with 3 CPUs being
worse than 1 CPU in most cases. :(

While poking around looking for benchmarks I discovered that Boost has
a lock-free queue:

http://www.boost.org/doc/libs/1_53_0/doc/html/boost/lockfree/queue.html

And Stack Overflow has some good advice:

http://stackoverflow.com/questions/15326282/is-boostlockfreequeue-not-lockfree-with-c11#comment21642171_15326282

Since it looks like we're going to be using queues for the resolver,
this is good stuff to look at!

Cheers,

--
Shane
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 198 bytes
Desc: not available
URL: <https://lists.isc.org/pipermail/bind10-dev/attachments/20130524/8ea3e76d/attachment.bin>


More information about the bind10-dev mailing list