Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Hazard Pointer Reclamation - Unlock Tagged list faster
Summary: PROBLEM During reclamation of tagged objects, we obtain a lock within the hazard pointer domain's tagged list. This list supports always pushing objects, but only allows popping when there is a lock (for `tagged_`). There is opportunity to improve the performance of reclamation, by keeping the `tagged_` list locked for a smaller amount of time. SOLUTION The list is locked to prevent multiple threads from reclaiming the same objects. During reclamation, we take all objects that are potentially cleaned up, and divide them into 2 parts: Those that must be reclaimed, and those that must not. The ones that are not are pushed back to the `tagged_` list, and the list is unlocked. The objects to be reclaimed are freed - by pushing to the cohort. The locking of list is to guard against the `tagged_` list itself, and hence when we push the not-to-be-reclaimed elements back, we could theoretically release the lock without waiting for the reclaimed objects to finish being processed. Also validated that the `nomatch` handling is thread-safe - The cohort's `push_safe_obj` uses as CAS loop to safely add to the top of the list. Differential Revision: D51638674
- Loading branch information