]> 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)
committerMatthew Wilcox (Oracle) <willy@infradead.org>
Sat, 30 Oct 2021 03:38:42 +0000 (23:38 -0400)
commitbca79a5eebdfffe9e575b4344544a6feea914dbb
tree8a005c0388005d3ddd1b99cdbf65aa6496c2389c
parentd21b3704beb8ab61eb4fe31f63c8509e243a62dc
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