From owner-svn-src-head@FreeBSD.ORG Fri Jul 9 19:03:14 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 C1834106564A; Fri, 9 Jul 2010 19:03:14 +0000 (UTC) (envelope-from pali.gabor@googlemail.com) Received: from mail-bw0-f54.google.com (mail-bw0-f54.google.com [209.85.214.54]) by mx1.freebsd.org (Postfix) with ESMTP id 199B08FC13; Fri, 9 Jul 2010 19:03:13 +0000 (UTC) Received: by bwz12 with SMTP id 12so1596766bwz.13 for ; Fri, 09 Jul 2010 12:03:10 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=gamma; h=domainkey-signature:received:received:sender:message-id:date:from :organization:user-agent:mime-version:to:cc:subject:references :in-reply-to:x-enigmail-version:content-type :content-transfer-encoding; bh=Y2FagyTeZyaJ5qtPNLWv2lWR5l2vBPLDRnjZ3qMJ9lE=; b=xbho+ydClF3xmgQhd55tJo4cZXiHWQByM9PV/otuVVhudPGNWbYJwqhRAnQ5umAtVC 6uVZQXBE/QcU/rNGRgzNOIP/SP80QXb6un1vDYQHlMjdY0z1X36rY2iZ0xPDTgvgNGXb IoZELdimNJoz5J2RSGlnSptWl39Yh1ByPzaPA= DomainKey-Signature: a=rsa-sha1; c=nofws; d=googlemail.com; s=gamma; h=sender:message-id:date:from:organization:user-agent:mime-version:to :cc:subject:references:in-reply-to:x-enigmail-version:content-type :content-transfer-encoding; b=ZE5DoSEoQyZ+34rNcbC9+LGk8MRdxhCu25Z+BVbrbsAGLR3OXB8Bn2wac8lXkAc6in Q64FdrQK8BZS1xxrNVHgczEPf3PsaTWwJmohTgh6esdr7g9nWr/h2Qo2YoEK6OFWx5ea 04dlaLWLS5VPUW16BZ/iylsbiqw8o3mDFnH2Y= Received: by 10.204.83.167 with SMTP id f39mr7872077bkl.151.1278702190118; Fri, 09 Jul 2010 12:03:10 -0700 (PDT) Received: from [129.16.199.244] (dhcp-199-244.nomad.chalmers.se [129.16.199.244]) by mx.google.com with ESMTPS id x19sm4940144bkv.21.2010.07.09.12.03.09 (version=SSLv3 cipher=RC4-MD5); Fri, 09 Jul 2010 12:03:09 -0700 (PDT) Sender: =?UTF-8?B?UMOBTEkgR8OhYm9yIErDoW5vcw==?= Message-ID: <4C37713D.5060202@FreeBSD.org> Date: Fri, 09 Jul 2010 20:58:05 +0200 From: Gabor PALI Organization: The FreeBSD Project User-Agent: Mozilla/5.0 (X11; U; FreeBSD amd64; en-US; rv:1.9.1.9) Gecko/20100331 Thunderbird/3.0.4 MIME-Version: 1.0 To: Robert Watson References: <4C376B0E.9050505@FreeBSD.org> In-Reply-To: X-Enigmail-Version: 1.0.1 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit 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 19:03:14 -0000 On 07/09/10 20:50, Robert Watson wrote: > 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. That is why I CC'ed svn-src-head@ :) (But I do not see any sign whether my last email reached it -- I am not an that list.) I hope other committers will help me with this, because I would like to use it in my project, and I think it would be useful in general. > 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. In a few words: As far as I know, 64-bit atomic counters could be implemented by using cmpxchg8b or by a plain uint64_t variable protected by some kind of locking(9). Cheers, :g