Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id ; Tue, 27 Aug 2002 16:49:59 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id ; Tue, 27 Aug 2002 16:49:59 -0400 Received: from to-velocet.redhat.com ([216.138.202.10]:19697 "EHLO touchme.toronto.redhat.com") by vger.kernel.org with ESMTP id ; Tue, 27 Aug 2002 16:49:58 -0400 Date: Tue, 27 Aug 2002 16:54:17 -0400 From: Benjamin LaHaise To: Andi Kleen Cc: Dean Nelson , linux-kernel@vger.kernel.org Subject: Re: atomic64_t proposal Message-ID: <20020827165417.C23980@redhat.com> References: <200208271937.OAA78345@cyan.americas.sgi.com.suse.lists.linux.kernel> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5.1i In-Reply-To: ; from ak@suse.de on Tue, Aug 27, 2002 at 09:58:45PM +0200 Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1124 Lines: 23 On Tue, Aug 27, 2002 at 09:58:45PM +0200, Andi Kleen wrote: > Is it supposed to only work on 64bit or do you plan to supply it for 32 > bit too? If no, I don't see how drivers etc. should ever use it. linux > is supposed to have a common kernel api. > If yes, the implementation on 32bit could be a problem. e.g. some > archs need space in there for spinlocks, so it would be needed to limit > the usable range. There are a couple of options for implementations to use that don't require space for a spinlock: a hash table of spinlocks can be used to protect the data (parisc uses this technique). Andrea's lockless reader locks could be useful in this case. Most x86es can use cmpxchg8, and the 64 bit machines are already set. I suspect it would be a useful addition to the kernel APIs. -ben -- "You will be reincarnated as a toad; and you will be much happier." - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/