You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
A request for benchmarks demonstrating the facility is better then the CAS + loop Authors: The performance benefit is that a non-CAS implementation would instead rely on an existing CPU-level implementation which, as the paper explains, is already available on many platforms (Editor's note: this is standardization of existing practice).
A request for a "Tony table" of code with and without the proposed functions Authors: Example of CAS exists in N2396. Example of 'atomic_fetch_max':
T atomic_fetch_max(T value)
{
unsigned long read = this->load();
while (value > read) {
if (this->compare_exchange_weak(read, value))
return read;
}
return read;
}
Regarding the write barrier macro - Is it possible that code built for an architecture that doesn’t need the barrier could run on an architecture that does, or vice versa? Point is to avoid making things compile-time constants when they might more correctly be decided at run time. Authors: This is a very good question. One platform made its behaviour in the past subject to environment flags.
I hope that if such a macro was provided, it wouldn't need to be used often and in cases when it would make a difference, an alternative algorithm could be found.
Perhaps by NOT defining such a macro, we will encourage that all algorithms should be written this way and end up with better lockfree designs.
Strong support in the proposal:
Functionality proposed on this papier, will eliminate 99% of the CAS loop usages in the code I have written, and by doing so improve its usability.
Many implementations already provide intrinsics for these operations, and they are both widely used and work well.
I didn't recognize objections to the proposal.
I recommend that the authors will add the examples requested, and that we'll move fixed revision directly to electronic polls.
Activity
ogiroux commentedon Jul 7, 2020
Continue the discussion of early bail offline (idempotent operations being said to be non-synchronizing while allowing strengthening as well).
Want an atomic min/max operation.
Yay 9 Nay 1
We want this operation (with the semantics we determine are right) to be called fetch_min/max.
No objections.
wg21bot commentedon May 21, 2021
P0493R2 Atomic maximum/minimum (Al Grant, Bronek Kozicki)
inbal2l commentedon Sep 11, 2021
The paper was seen by LEWG ML review. summary:
A request for benchmarks demonstrating the facility is better then the CAS + loop
Authors: The performance benefit is that a non-CAS implementation would instead rely on an existing CPU-level implementation which, as the paper explains, is already available on many platforms (Editor's note: this is standardization of existing practice).
A request for a "Tony table" of code with and without the proposed functions
Authors: Example of CAS exists in N2396. Example of 'atomic_fetch_max':
Regarding the write barrier macro - Is it possible that code built for an architecture that doesn’t need the barrier could run on an architecture that does, or vice versa? Point is to avoid making things compile-time constants when they might more correctly be decided at run time.
Authors: This is a very good question. One platform made its behaviour in the past subject to environment flags.
I hope that if such a macro was provided, it wouldn't need to be used often and in cases when it would make a difference, an alternative algorithm could be found.
Perhaps by NOT defining such a macro, we will encourage that all algorithms should be written this way and end up with better lockfree designs.
Strong support in the proposal:
I didn't recognize objections to the proposal.
I recommend that the authors will add the examples requested, and that we'll move fixed revision directly to electronic polls.
105 remaining items