That "This is part of the " comment should continue with "struct futex_q",
but I went off and was supposed to check what the futex data structure was
called, and forgot about updating it.
Anyway, the point being that this needs no new allocations in _any_ path,
and only extends a structure that we already need for the slow case for
futexes. It does imply a new lock, though, and the COW path would have to
check that hash (which should scale pretty well, since we only have
entries here when somebody is blocked on a futex).
Oh, and we need a new hash table, since the native futex hash can't just
be re-used due to different indexing - the futex hash is based on physical
page and offset, while the page_change_struct hash is based on virtual
address and the mm.
(I initially thought we could make the page_change_struct hash be based on
physical page, but there can be multiple instances of the same physical
page being mapped into the same VM, so that wouldn't be a good thing -
we'd get callbacks for the wrong virtual address being COW'ed).
Linus
-
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/