]> www.infradead.org Git - users/jedix/linux-maple.git/commit
mmap: change zeroing of maple tree in __vma_adjust()
authorLiam R. Howlett <Liam.Howlett@Oracle.com>
Mon, 22 Aug 2022 15:04:26 +0000 (15:04 +0000)
committerAndrew Morton <akpm@linux-foundation.org>
Fri, 26 Aug 2022 05:03:12 +0000 (22:03 -0700)
commitbd7927f761efe46a6663cbdd702991bbab6f317c
tree790ccd645c12d60c3617d4ab20b21aee3d128eaf
parentce9d106214d17a5cf8267e275eeee5e153504e81
mmap: change zeroing of maple tree in __vma_adjust()

Only write to the maple tree if we are not inserting or the insert isn't
going to overwrite the area to clear.  This avoids spanning writes and
node coealescing when unnecessary.

The change requires a custom search for the linked list addition to find
the correct VMA for the prev link.

Link: https://lkml.kernel.org/r/20220822150128.1562046-19-Liam.Howlett@oracle.com
Signed-off-by: Liam R. Howlett <Liam.Howlett@oracle.com>
Cc: Catalin Marinas <catalin.marinas@arm.com>
Cc: David Hildenbrand <david@redhat.com>
Cc: David Howells <dhowells@redhat.com>
Cc: "Matthew Wilcox (Oracle)" <willy@infradead.org>
Cc: SeongJae Park <sj@kernel.org>
Cc: Sven Schnelle <svens@linux.ibm.com>
Cc: Vlastimil Babka <vbabka@suse.cz>
Cc: Will Deacon <will@kernel.org>
Cc: Yu Zhao <yuzhao@google.com>
Cc: Davidlohr Bueso <dave@stgolabs.net>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
mm/mmap.c