On Sat, Jul 10, 2010 at 5:24 PM, Robert N. M. Watson
<rwat...@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
_______________________________________________
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"

Reply via email to