Re: [PATCH] Alternate futex non-page-pinning and COW fix

From: Jamie Lokier
Date: Thu Sep 04 2003 - 16:01:34 EST


Rusty Russell wrote:
> I don't have a problem with the omission. mremap is logically
> equivalent to munmap + mmap, so it's a subset of the "I unmapped
> underneath my futex!". It's not like it's going to happen without the
> caller knowing: if the address doesn't change, then the futexes won't
> break. If they do, the caller needs to reset them anyway.

I think mremap() on block of memory containing futexes is reasonable.
Imagine a big data structure with a table futex locks at the start of
it. I'm not sure how useful it is, but it's not worthless.

Anyway, I have a patch, tested, which moves remapped futexes _and_
returns EFAULT to waiters when pages are unmapped. It's kept separate
from the main futex patch so you can accept it or not.

-- Jamie

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/