svn commit: r209119 - head/sys/sys
Robert N. M. Watson
rwatson at FreeBSD.org
Sat Jul 10 15:24:47 UTC 2010
On 9 Jul 2010, at 19:58, Gabor PALI wrote:
>> I assume there are reasonable alternatives that work around the
>> potential race with a small probability of a missed or extra update,
>> or similar, which would be fine.
>
> In a few words: As far as I know, 64-bit atomic counters could be
> implemented by using cmpxchg8b or by a plain uint64_t variable protected
> by some kind of locking(9).
If we can do it in one atomic in the common case, and two atomics in an edge case, that sounds fine. I think any use of locking(9) would be sufficiently costly as to not be worth the improvements in consistency, given the frequency of statistics operations.
Robert
More information about the svn-src-head
mailing list