Re: [PATCH 2/2] Futex non-page-pinning fix

From: William Lee Irwin III
Date: Tue Aug 26 2003 - 05:38:28 EST


On Tue, Aug 26, 2003 at 11:08:00AM +0300, Muli Ben-Yehuda wrote:
> How about combining something that's shared to all of the threads that
> share a futex but not system wide (the mm?) with something simple that
> won't change, like the page offset? Adding the mm into the mix wil
> make collisions harder, and limiting the buckets to the number of
> different futex offsets will make it simple and differentiate between
> different futexes in the same mm.

The mm is not the sharing boundary; it can be shared along the usual
sharing boundaries; hence we have the usual two cases:

(a) shared between all those mmap()'ing some inode for file-backed memory
Can be handled by embedding it into a struct address_space.
(b) shared between all fork()'s between exec()'s for anonymous memory
Can be handled by embedding it in some new object representing
all fork()'s between exec()'s.
(c) anonymous pages formerly owned by inodes orphaned by truncate().
This is hard.

The containing object (for (a) and (b)) can be located with a back
pointer from the futex, except you have the usual intractable disaster
whenever file-backed pages are anonymized via truncate().


-- wli
-
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/