Quite some time there was a discussion around mprotect and why it
creates vmas. The issue never got resolved IIRC but the urgency is
more pressing than ever. We have today commodity machines with 8
sockets and 512G of RAM with single processes using all these
resources.
>From what I remember the idea was that an mprotect call shouldn't
really have to split a vma. Frequent examples are DSO loading, the
malloc implementation, or thread stacks. They both have to change the
protection of a memory region to PROT_NONE or in other cases
add/remove PROT_WRITE etc.
This information could be represented in the page table tree alone and
doesn't require a vma split.
Is this something that can be considered? This could reduce the
number of vmas in a large process significantly, reducing the cost of
finding a specific vma or, perhaps more importantly, gaps.