lkml.org 
[lkml]   [2003]   [Sep]   [5]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 1/2] Unpinned futexes v2 - part 1: indexing changes
Linus Torvalds wrote:
> > (The next patch in this series fixes mremap()).
>
> I don't think this one is worth it. If the user unmaps or changes the
> mapping from under the futex, I just think that is "user error". And the
> same way it is totally undefined what happens if one thread re-organizes
> the VM space while another thread may be doing some other operation
> (read() or similar), we just don't care.

I agree for synchronous futexes, the inherent race conditions do
make it "user error".

For async futexes (FUTEX_FD), I think it has a well-defined and
potentially useful meaning to move futexes on remapping, if that's
what the program wants to do.

It's well-defined for shared mappings, and then it's even useful
(think database with locks distributed in an 8GB file). So it's a
little odd for it to fail for private mappings.

I'm not wedded to the idea. Just so long as it's mentioned in "man
futex" under "don't do this".

-- Jamie
-
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:48    [W:1.090 / U:0.744 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site