From owner-svn-src-head@FreeBSD.ORG Fri Jul 9 18:50:30 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 6EA841065677; Fri, 9 Jul 2010 18:50:30 +0000 (UTC) (envelope-from rwatson@FreeBSD.org) Received: from cyrus.watson.org (cyrus.watson.org [65.122.17.42]) by mx1.freebsd.org (Postfix) with ESMTP id 49A228FC1C; Fri, 9 Jul 2010 18:50:30 +0000 (UTC) Received: from fledge.watson.org (fledge.watson.org [65.122.17.41]) by cyrus.watson.org (Postfix) with ESMTPS id C4F9446BA1; Fri, 9 Jul 2010 14:50:29 -0400 (EDT) Date: Fri, 9 Jul 2010 19:50:29 +0100 (BST) From: Robert Watson X-X-Sender: robert@fledge.watson.org To: Gabor PALI In-Reply-To: <4C376B0E.9050505@FreeBSD.org> Message-ID: References: <4C376B0E.9050505@FreeBSD.org> User-Agent: Alpine 2.00 (BSF 1167 2008-08-23) MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed Cc: svn-src-head@freebsd.org Subject: Re: svn commit: r209119 - head/sys/sys X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 09 Jul 2010 18:50:30 -0000 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