From owner-freebsd-arch@FreeBSD.ORG Sun Aug 19 13:35: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 4498116A419; Sun, 19 Aug 2007 13:35:51 +0000 (UTC) (envelope-from jroberson@chesapeake.net) Received: from webaccess-cl.virtdom.com (webaccess-cl.virtdom.com [216.240.101.25]) by mx1.freebsd.org (Postfix) with ESMTP id 0C5D013C45D; Sun, 19 Aug 2007 13:35:50 +0000 (UTC) (envelope-from jroberson@chesapeake.net) Received: from [192.168.1.103] (c-67-160-44-208.hsd1.wa.comcast.net [67.160.44.208]) (authenticated bits=0) by webaccess-cl.virtdom.com (8.13.6/8.13.6) with ESMTP id l7JDZiEA009290 (version=TLSv1/SSLv3 cipher=DHE-DSS-AES256-SHA bits=256 verify=NO); Sun, 19 Aug 2007 09:35:45 -0400 (EDT) (envelope-from jroberson@chesapeake.net) Date: Sun, 19 Aug 2007 06:38:30 -0700 (PDT) From: Jeff Roberson X-X-Sender: jroberson@10.0.0.1 To: Bruce Evans In-Reply-To: <20070819223351.R1132@besplex.bde.org> Message-ID: <20070819063348.M568@10.0.0.1> References: <20070818120056.GA6498@garage.freebsd.pl> <20070818220756.GH6498@garage.freebsd.pl> <20070819142214.O34036@delplex.bde.org> <20070819004949.U568@10.0.0.1> <20070819223351.R1132@besplex.bde.org> 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 13:35:51 -0000 On Sun, 19 Aug 2007, Bruce Evans wrote: > 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. Well this really has little to do with the problem at hand. The long decision has already been made and it's not practical to change it now. Adding apis that accept the types that we've decided on should not be crippled because you don't like the types. I agree that we can't have atomics that are wider than architectures support, but that isn't the case here. > > [Context lost to top posting] I included the context that I needed. > > Bruce >