From owner-freebsd-arch@FreeBSD.ORG Sun Aug 19 12:44:51 2007 Return-Path: Delivered-To: freebsd-arch@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 8685F16A419; Sun, 19 Aug 2007 12:44:51 +0000 (UTC) (envelope-from brde@optusnet.com.au) Received: from mail08.syd.optusnet.com.au (mail08.syd.optusnet.com.au [211.29.132.189]) by mx1.freebsd.org (Postfix) with ESMTP id 0BCAB13C457; Sun, 19 Aug 2007 12:44:50 +0000 (UTC) (envelope-from brde@optusnet.com.au) Received: from besplex.bde.org (c220-239-235-248.carlnfd3.nsw.optusnet.com.au [220.239.235.248]) by mail08.syd.optusnet.com.au (8.13.1/8.13.1) with ESMTP id l7JCicuu023875 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Sun, 19 Aug 2007 22:44:40 +1000 Date: Sun, 19 Aug 2007 22:44:38 +1000 (EST) From: Bruce Evans X-X-Sender: bde@besplex.bde.org To: Jeff Roberson In-Reply-To: <20070819004949.U568@10.0.0.1> Message-ID: <20070819223351.R1132@besplex.bde.org> References: <20070818120056.GA6498@garage.freebsd.pl> <20070818220756.GH6498@garage.freebsd.pl> <20070819142214.O34036@delplex.bde.org> <20070819004949.U568@10.0.0.1> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed Cc: Pawel Jakub Dawidek , freebsd-arch@freebsd.org Subject: Re: Lockless uidinfo. X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 19 Aug 2007 12:44:51 -0000 On Sun, 19 Aug 2007, Jeff Roberson wrote: > On Sun, 19 Aug 2007, Bruce Evans wrote: >> atomic_*long() shouldn't exist (and doesn't exist in my version) since >> longs should actually be long (twice as long as registers) and thus >> especially epensive to lock. > > Well unfortunately this is not how the compiler implements them on the > architectures that we support. So in this case long is 32bit on 32bit > machines and 64bit on 64bit machines and as such requires each architecture > to treat them specially. I don't think it's unreasonable to add an > atomic_fetchadd_long() that conforms to the definition of long that is > actually in use. The compiler has nothing to do with this. The implementation is FreeBSD's and it is poor, like I said. [Context lost to top posting] Bruce