felipecrv commented on PR #40647: URL: https://github.com/apache/arrow/pull/40647#issuecomment-2018219789
@pitrou wrote: > The maximum would be the least sensitive to divergence actually, become it's replacing one correct value with another correct value. At worse, it would not report the true maximum, but it would report a reasonable value nonetheless. > > Non-atomic in-place addition, though, could easily diverge if some additions are "lost". This is exactly what I concluded as well. And I agree that the solution here would be to have multiple counters and paying the cost on loads, instead of plastering `relaxed` everywhere and getting non-sensical results. @mapleFU @zanmato1984 I decided to have this PR focus solely on the ordering of loads and stores and will explore contention-reduction solution in another issue/PR pair. But there is also something @amoeba would like to be considered here: can we disable the stats collection altogether [1] considering its non-trivial cost? [1] controlled by some build or runtime flag -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
