Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 11 Jul 2010 05:18:37 +0200
From:      Gabor PALI <pgj@FreeBSD.org>
To:        "Robert N. M. Watson" <rwatson@freebsd.org>
Cc:        svn-src-head@freebsd.org
Subject:   Re: svn commit: r209119 - head/sys/sys
Message-ID:  <AANLkTikkDxOPhiA_NYmwO_Bpxb9g2M7UGRpBW85dBN_I@mail.gmail.com>
In-Reply-To: <4A28A601-C87F-47C6-8CBE-5F1BF866CA4A@FreeBSD.org>
References:  <4C376B0E.9050505@FreeBSD.org> <alpine.BSF.2.00.1007091949170.94277@fledge.watson.org> <4C37713D.5060202@FreeBSD.org> <4A28A601-C87F-47C6-8CBE-5F1BF866CA4A@FreeBSD.org>

next in thread | previous in thread | raw e-mail | index | archive | help
On Sat, Jul 10, 2010 at 5:24 PM, Robert N. M. Watson
<rwatson@freebsd.org> wrote:
> If we can do it in one atomic in the common case, and two atomics in an e=
dge case, that sounds fine. I think any use of locking(9) would be sufficie=
ntly costly as to not be worth the improvements in consistency, given the f=
requency 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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?AANLkTikkDxOPhiA_NYmwO_Bpxb9g2M7UGRpBW85dBN_I>