]> 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, 22 Oct 2021 00:27:27 +0000 (20:27 -0400)
commitba7936107cd7d17fb872b6ceb7704c0fa954c0de
tree466bd711c87715f401d6a1a77fa6cfa503f9a6bd
parentf5e8af5e9a309d8844c79d917007e8a255a1b423
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