lkml.org 
[lkml]   [2002]   [Aug]   [27]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: atomic64_t proposal
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/

\
 
 \ /
  Last update: 2005-03-22 13:22    [W:0.160 / U:1.556 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site