[lkml]   [2008]   [May]   [31]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: [PATCH 0/3] 64-bit futexes: Intro

On Fri, 30 May 2008, Linus Torvalds wrote:
> Also note how you can use 64-bit atomic ops to do that all in user space,
> without actually requiring 64-bit futex support - as long as the bits that
> matter for waking (like "was there more than one pending writer") fit in
> the one 32-bit word.

So here's an example of this:

- make all the readers/writers actually update a 64-bit word (by using
cmpxchg8b in user space to actually get the locks)

- but organize things so that a reader only needs to look at the high 32
bits to actually make it's wakeup-decision, and a sleeping writer only
needs to look at the low 32 bits. How? Make the low bits of the words
contain the "contention status".

Is it possible? I dunno. I personally suspect it is. I also suspect you
didn't even try.


 \ /
  Last update: 2008-05-31 06:55    [W:0.076 / U:9.652 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site