]> www.infradead.org Git - users/jedix/linux-maple.git/commit
mm/mmap: Change do_brk_flags() to expand existing VMA and add
authorLiam R. Howlett <Liam.Howlett@Oracle.com>
Mon, 21 Sep 2020 14:47:34 +0000 (10:47 -0400)
committerLiam R. Howlett <Liam.Howlett@oracle.com>
Fri, 26 Nov 2021 19:50:29 +0000 (14:50 -0500)
commit92fd3135b25c05a728604e6f4def8ad382c53437
tree6d225b04edbf6e12561d32d3a833a16b855d72fc
parent1715aa0c2aeb0991e3799dc849c8db94ff5eed08
mm/mmap: Change do_brk_flags() to expand existing VMA and add
do_brk_munmap()

Avoid allocating a new VMA when it a vma modification can occur.  When a
brk() can expand or contract a VMA, then the single store operation will
only modify one index of the maple tree instead of causing a node to
split or coalesce.  This avoids unnecessary allocations/frees of maple
tree nodes and VMAs.

Use the advanced API for the maple tree to avoid unnecessary walks of
the tree.

Signed-off-by: Liam R. Howlett <Liam.Howlett@Oracle.com>
mm/mmap.c