svn commit: r209119 - head/sys/sys

Gabor PALI pgj at FreeBSD.org
Sun Jul 11 03:18:39 UTC 2010


On Sat, Jul 10, 2010 at 5:24 PM, Robert N. M. Watson
<rwatson at freebsd.org> wrote:
> 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.

I have tried to use atomic operations for counting (without
locking(9)), but they turned out to be significantly slower than the
naive case indeed.  If consistency is not so important for statistics,
whether would it be safe to simply use 64-bit variables for counters
everywhere on all architectures?

:g


More information about the svn-src-head mailing list