]> 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>
Thu, 24 Jun 2021 20:04:21 +0000 (16:04 -0400)
commit1f674980f8610b379385e21ebd1828f6b4203f6e
tree05359d6e6af4c3ebf42e29366df2d443e486682a
parent9f9395a022938f809bb7a6c8889b4875368e0632
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