Re: [RFC] NUMA futex hashing

Ulrich Drepper
2006-08-08T15:36:26Z

On 8/8/06, Nick Piggin <nickpiggin@yahoo.com.au> wrote:
> Let me get this straight: to insert a contended futex into your rbtree,
> you need to hold the mmap sem to ensure that address remains valid,
> then you need to take a lock which protects your rbtree.

Why does it have to remain valid? As long as the kernel doesn't crash
on any of the operations associated with the futex syscalls let the
address space region explode, implode, whatever. It's a bug in the
program if the address region is changed while a futex is placed
there. If the futex syscall hangs forever or returns with a bogus
state (error or even success) this is perfectly acceptable. We
shouldn't slow down correct uses just to make it possible for broken
programs to receive a more detailed error description.