Liste des Groupes | Revenir à c arch |
On 7/30/2024 4:26 PM, Chris M. Thomasson wrote:Yup. Fwiw, I did one with local counters for a strange reference counting thing that was pretty damn local. It would allow a thread to gain a strong reference by incrementing a local pointer-based hashed reference count. Each thread would have a table of counters that pointers were hashed into.On 7/30/2024 12:59 PM, jseigh wrote:I finally got around to writing a proxy version, smrproxy, here https://github.com/jseigh . Also there's an atomic reference counted proxy, arcproxy. Timings are here https://threadnought.wordpress.com/2023/06/09/smrproxy-timing-comparisons/ .The folly library hazard pointers use that on windows, membarrier() system call on linux (something else on older linuxes), to get rid of the expensive store/load memory barrier in hazard pointer loads.>
I need to check that out; thanks for the heads up. Fwiw, remember that old thread on comp.programming.threads where you first'ish published your ideas on RCU+SMR? I need to see if the folly library references your work. Also, remember when some paper from SUN or something was trying to claim your atomic_ptr logic? Iirc, we talked about it back on comp.arch, a long time ago...
>
I remember you issued a "challenge like" post over on comp.programming.threads wrt detecting quiescent periods. Iirc, I was the first one to comment wrt a possible hackish solution using timing wrt kernel time. ;^)
>
>Something like 0.7 nsecs w/o membar vs 7.7 w/ membar. The term I've seen being used now is asymmetric memory barrier.>
Big time! This is bringing back a lot of memories Joe. :^) Thanks.
>
smr is what I use to refer to hazard pointers. In the original smrrcu, the rcu refered to the rcu polling of context switches which had the property of performing a memory barrier action. I had to go through the linux proc filesystem for that. Talk about pain. I was really glad that somebody implemented membarrier().
I also did a variation where you used local counters like when we were first messing with userspace rcu. About the same performance but with an extra polling cycle (events vs conditions). I tried to put in the same code as smrproxy but pseudo OO in C gets messy when you try to implement chimerical types, so I yanked it out.
atomic-ptr-plus is there but it's been copied from sourceforge to google to github. I don't know if it's still intact.Your work with RCU+SMR would be a great reference to give.
There's no attributions to anything in folly.
It will probably end up like what's now called split reference counting which is now folklore according to a cppcon talk.When I think of split counters for some reason I think of the per-thread counters that sum at intervals? :^) What about your differential reference counting? Works like a charm.
Les messages affichés proviennent d'usenet.