Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 9 Jul 2010 19:50:29 +0100 (BST)
From:      Robert Watson <rwatson@FreeBSD.org>
To:        Gabor PALI <pgj@FreeBSD.org>
Cc:        svn-src-head@freebsd.org
Subject:   Re: svn commit: r209119 - head/sys/sys
Message-ID:  <alpine.BSF.2.00.1007091949170.94277@fledge.watson.org>
In-Reply-To: <4C376B0E.9050505@FreeBSD.org>
References:  <4C376B0E.9050505@FreeBSD.org>

next in thread | previous in thread | raw e-mail | index | archive | help

On Fri, 9 Jul 2010, Gabor PALI wrote:

> On 06/18/10 14:08, Robert Watson wrote:
>> The only reservation I have, really, is that 64-bit writes are
> non-atomic on
>> i386 and other 32-bit architectures (or, at least, I think they are).
> This
>> means DPCPU_SUM may encounter non-atomicity rather than just staleness
> in the
>> values it reads as it iterates. That said, we should probably use 64-bit 
>> anyway, because 32-bit counters are gauche. :-)
>
> What is about introducing 64-bit atomic counters?

There's no native 64-bit atomic add primitive on most 32-bit platforms; 
however, I think I have an e-mail in my in queue from you suggesting an 
alternative approach that I haven't yet gotten to due to utter saturation 
here.  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.

Robert



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