|
|
Subscribe / Log in / New account

lockless data structures?

lockless data structures?

Posted Aug 1, 2008 1:43 UTC (Fri) by maney (subscriber, #12630)
In reply to: lockless data structures? by shapr
Parent article: The lockless page cache

From one of Val's responses to a question asked about the KHB: Synthesis article:

My personal opinion is that lock-free algorithms are not a good generic synchronization technique, and are definitely very very complex and difficult to understand. However, in certain specific cases, lock-free can be simple, elegant, and a huge performance advantage over traditional approaches.


to post comments

lockless data structures?

Posted Aug 1, 2008 15:42 UTC (Fri) by PaulMcKenney (✭ supporter ✭, #9624) [Link]

Val's comment is directed at lock-free synchronization, which is a very different animal than lockless algorithms. The RCU implementation described in this article is lockless, but not lock-free: although RCU has deterministic read-side primitives, its updates can block via call_rcu() and synchronize_rcu(). In some cases, the fact that RCU's updates do block keeps things (relatively) simple.

We are still learning how best to use RCU to obtain good performance and scalability while keeping things (again, relatively) simple. For that matter, we are also still learning when not to use RCU. RCU is quite specialized, so is not always the right tool for the job, much though I might wish it otherwise. ;-)


Copyright © 2025, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds