Sure sure. I still think it's _way_ too complex. See my previous email
where I suggested one single simple additional rule that I think makes
things _much_ simpler.
Right. The case of different anon_vma's is the trivial one. I don't worry
about that.
And yes, split is fundamentally simple. Split guarantees that the chains
look identical.
But:
THIS is where I think you simplified a lot and said "and magic happens".
The thing is, in the case of create, we create a different chain. That
simple fact just makes merging fundamentally complicated. And we now have
two different chains, and both of those can split, so those differences
can "spread out". And you need to guarantee that "merge" really works. It
didn't work in your original code, and quite frankly, I do _not_ think
it's entirely obvious that it works in Johannes' code either.
Don't get me wrong: _maybe_ Johannes' code works fine. I just don't think
it's obvious at all. And if it doesn't work fine, now you're just
spreading the differences even further.
This is why I suggest that we limit the "re-use an existing vma for a new
case" to the singleton case, which means that now you _never_ have
differences at all. There's no spreading on splitting. Merging is trivial.
Now, admittedly, I'm really hopped up on cough medication, so the feeling
of this solving all the problems in the universe may not be entirely
accurate. But it feels so _right_.
I hope if feels right when I'm off my meds too.
Linus
--