]> www.infradead.org Git - users/willy/linux.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>
Wed, 20 Oct 2021 20:00:32 +0000 (16:00 -0400)
commit441151ed05a4be2ab1781aa73a1586298d5a7896
tree2c3ec784776281276a69e4dfea1269e8f8af632a
parent808cdf500532b2e288992a80083219319e445314
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