Closed nspark closed 12 months ago
The difference between atomic operations and these {add, set} operations is their atomicity guarantees, correct?
Yes. AMOs are only guaranteed atomicity of updates w.r.t. other AMOs of the same data type (but for all operation types; e.g., set, add, xor). Signal operations are only guaranteed atomicity of updates w.r.t. other signal operations of the same operation type (i.e., add or set).
I think the intent was that, for performance reasons, shmem_signal_set
and shmem_put_signal(SET)
can provide (for example) single-copy atomic writes without needing the full strength of atomicity required by AMOs.
I think this adds quite a bit API bloat, while the semantical difference is very nuanced. I would suggest to add a parameter to shmalloc that lets you define desired AMO semantics, so you can reuse all existing AMO operations.
May spec meeting: Please add change log entry
shmem_signal_{add,set}
Closes #382