- 论坛徽章:
- 8
|
我在Paul的RCU文章, What is RCU, Fundamentally?
关于文中给出的问题, 百思不得其解, 实际上是没看懂答案:
Quick Quiz 5: How many RCU versions of a given list can be active at any given time?
Answer: That depends on the synchronization design. If a semaphore protecting the update is held across the grace period, then there can be at most two versions, the old and the new.
However, if only the search, the update, and the list_replace_rcu() were protected by a lock, then there could be an arbitrary number of versions active, limited only by memory and by how many updates could be completed within a grace period. But please note that data structures that are updated so frequently probably are not good candidates for RCU. That said, RCU can handle high update rates when necessary.
我认为, list可以任意多个. 不太理解semaphore带来的影响, 为什么只有两个?
|
|