From owner-freebsd-ppc@FreeBSD.ORG Tue Sep 30 21:37:36 2008 Return-Path: Delivered-To: freebsd-ppc@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A9F941065698 for ; Tue, 30 Sep 2008 21:37:36 +0000 (UTC) (envelope-from grehan@freebsd.org) Received: from nagasaki.bogus.com (nagasaki.bogus.com [IPv6:2001:418:1::81]) by mx1.freebsd.org (Postfix) with ESMTP id 864C28FC1F for ; Tue, 30 Sep 2008 21:37:36 +0000 (UTC) (envelope-from grehan@freebsd.org) Received: from dhcp-206.nokiaip.net ([192.103.16.206]) (authenticated bits=0) by nagasaki.bogus.com (8.14.3/8.14.3) with ESMTP id m8ULb2V8006823 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NOT); Tue, 30 Sep 2008 21:37:35 GMT (envelope-from grehan@freebsd.org) Message-ID: <48E29BF3.40106@freebsd.org> Date: Tue, 30 Sep 2008 14:36:51 -0700 From: Peter Grehan User-Agent: Thunderbird 2.0.0.17 (Macintosh/20080914) MIME-Version: 1.0 To: Matt Sealey References: <60ACBA3B-927C-4F2C-8680-A6B40B81E06C@mac.com> <48DA84D5.4010109@semihalf.com> <48DA99F8.7070904@semihalf.com> <111399E3-2BC7-4724-8AFB-A40F2A47E66D@mac.com> <48DBC59C.3040101@semihalf.com> <48E28E58.1020901@genesi-usa.com> In-Reply-To: <48E28E58.1020901@genesi-usa.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: ClamAV 0.93.3/8361/Tue Sep 30 14:28:47 2008 on nagasaki.bogus.com X-Virus-Status: Clean Cc: freebsd-ppc@freebsd.org Subject: Re: 64-bit atomic ops on 32-bit CPU -- was: ZFS .. on PowerPC ? X-BeenThere: freebsd-ppc@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Porting FreeBSD to the PowerPC List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 30 Sep 2008 21:37:36 -0000 Hi Matt, > Isn't there some kind of semaphore primitive in FreeBSD that can be > used? The issue is the OpenSolaris ZFS code that makes liberal use of calls such as atomic_add_64(&ptr_to_uint64). This is emulated by having a global lock for all 64-bit atomic operations, but it would be better if this could be done without such workarounds on 32-bit ppc. later, Peter.