Open Yriuns opened 1 year ago
I observed the same situation for my case (99.99% reads), especially with many threads that's related to https://github.com/crossbeam-rs/crossbeam/issues/852
Another approach is implemented in the scc crate, where scan is started ONLY (@wvwwvwwv, is it correct?) when:
suspend()
.@taiki-e, what do you think about it?
@loyd yes, correct.
Recently I'm working on a epoch-based memory reclamation library and learned a lot of from crossbeam-epoch. Thank you for your great work.
But I noticed that we will call
global().collect()
everyPINNINGS_BETWEEN_COLLECT
1st pins. In the senario whichdefer_destroy
happens rarely, there is nothing to collect in most time. Buttry_advance
issues aSeqCst
ordering and a traverse of all threads, which is heavy. I wonder if we can add something like:at the beginning of
collect()
, to reduce the overhead?https://github.com/crossbeam-rs/crossbeam/blob/ce31c18607c44d3d07fc3618f981e858b35e3828/crossbeam-epoch/src/internal.rs#L201-L219