libera/#sicl - IRC Chatlog
Search
19:50:39
moon-child
hayley: about change-class: there is double-word contiguous cas. cmpxchg16b on x86, casp on arm, it looks like there's something also on riscv
23:33:08
hayley
Thanks. I'm aware of double word CAS (but not that it also existed on ARM and RISC-V).
23:34:17
moon-child
I _think_ it's part of the base A extension on rv, but on arm it's an extension (lse), and only part of base as of armv8.1+? 8.2+? One of those. I don't know how widespread support for it is in practice
23:34:49
hayley
We can still have incoherent objects if the object hasn't been added to the list, I think.
23:36:22
moon-child
yes, but if you recohere at that point, then whatever triggered the recoherence event (fence, atomic load or rmw) is not ordered wrt the access that is currently decohering the object
23:37:57
hayley
So we only need fences to synchronise with fences, and a fence implies that a thread is done decohering objects.
23:39:39
moon-child
I think only acq/acqrel fences need to recohere, and ditto atomic loads/rmw; not release fences or atomic stores (except seqcst maybe). But I am not sure about that
23:42:10
hayley
We still need to flip other threads out of replication, when a minor GC starts. I thought this would nearly work, as it uses CAS, but it could end up diddling another object with the same value at the same location after compaction.
23:47:11
hayley
There could still be a count of writes in flight, but that would cause some contention and starting GC would not be lock-free.
23:49:22
moon-child
well, suppose we use semispace. Then it's very unlikely that, when you get to gc, there are _still_ in-flight writes to to-space
23:50:47
moon-child
if there are, though, then allocate a fresh newspace, ditch the old one, and set a flag on it saying that, once the last writer finishes, it's responsible for reclaiming that space
23:51:01
moon-child
and use a per-thread in-flight write counter with a hash table, to avoid contention
23:54:52
moon-child
it's very annoying to have to track this. If there were no scheduler, and hence no chance of being scheduled out, I would be tempted to count cycles and let the race be
23:59:26
moon-child
you have to finish writing to the global heap before you can start on the nursery
0:05:35
hayley
"What do we want?" "Transactional memory!" "When do we want it?" *aborts" "What do we want?"