hazptr: Avoid deadlock on tagged list
Summary: Prevent deadlock on tagged retired lists within calls to `do_reclamation()` that call `cleanup_batch_tag()`. Changes: - Make locking the tagged list reentrant. - Eliminate sharding of tagged lists to prevent deadlock between concurrent calls to `do_reclamation()` on different shards that call `cleanup_batch_tag` on the other shard. - Expose the list of unprotected objects being reclaimed in `do_reclamation()` of the tagged list so that calls to `cleanup_batch_tag()` don't miss objects with a matching tag. - Refactor of commonalities between calls to `retire()` in `hazptr_obj_base` and `hazptr_obj_base_linked` into `hazptr_obj::push_obj()`. - Fixed release of tagged list lock to use CAS in a loop instead of store, since concurrent lock-free pushes are possible. Reviewed By: davidtgoldblatt Differential Revision: D13439983 fbshipit-source-id: 5cea585c577a64ea8b43a1827522335a18b9a933
Showing
Please register or sign in to comment