Re: anon_vma RFC2

Linus Torvalds
2004-03-12T16:11:10Z

On Fri, 12 Mar 2004, William Lee Irwin III wrote:
>
> Absolute guarantees are nice but this characterization is too extreme.
> The case where mremap() creates rmap_chains is so rare I never ever saw
> it happen in 6 months of regular practical use and testing. Their
> creation could be triggered only by remap_file_pages().

I have to _violently_ agree with Andrea on this one.

The absolute _LAST_ thing we want to have is a "remnant" rmap
infrastructure that only gets very occasional use. That's a GUARANTEED way
to get bugs, and really subtle behaviour.

I think Andrea is 100% right. Either do rmap for everything (like we do
now, modulo IO/mlock), or do it for _nothing_. No half measures with
"most of the time".

Quite frankly, the stuff I've seen suggested sounds absolutely _horrible_.
Special cases are not just a pain to work with, they definitely will cause
bugs. It's not a matter of "if", it's a matter of "when".

So let's make it clear: if we have an object-based reverse mapping, it
should cover all reasonable cases, and in particular, it should NOT have
rare fallbacks to code that thus never gets any real testing.

And if we have per-page rmap like now, it should _always_ be there.

You do have to realize that maintainability is a HELL of a lot more
important than scalability of performance can be. Please keep that in
mind.

Linus