2023-01-10

fanf: (Default)

https://dotat.at/@/2023-01-10-qsbr.html

At the end of October, I finally got my multithreaded qp-trie working! It could be built with two different concurrency control mechanisms:

  • A reader/writer lock

    This has poor read-side scalability, because every thread is hammering on the same shared location. But its write performance is reasonably good: concurrent readers don't slow it down too much.

  • liburcu, userland read-copy-update

    RCU has a fast and scalable read side, nice! But on the write side I used rcu_synchronize(), which is blocking and rather slow, so my write performance was terrible.

OK, but I want the best of both worlds! To fix it, I needed to change the qp-trie code to use safe memory reclamation more effectively: instead of blocking inside rcu_synchronize() before cleaning up, use call_rcu() to clean up asynchronously. I expect I'll write about the qp-trie changes another time.

Another issue is that I want the best of both worlds by default, but liburcu is LGPL and we don't want BIND to depend on code whose licence demands more from our users than the MPL.

So I set out to write my own safe memory reclamation support code.

Read more... )

March 2026

S M T W T F S
1234567
8910111213 14
15161718192021
22232425262728
293031    

Most Popular Tags

Style Credit

Expand Cut Tags

No cut tags
Page generated 2026-03-28 02:50
Powered by Dreamwidth Studios