]> 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>
Wed, 20 Jul 2022 02:17:49 +0000 (02:17 +0000)
committerLiam R. Howlett <Liam.Howlett@oracle.com>
Tue, 16 Aug 2022 15:09:01 +0000 (11:09 -0400)
commit8ae13aee6464f54c7ee22cf9465d96182283e13d
treef2cd2f6f35b248e8e0e4df3bf764717365e4bc15
parenta178a98b27f0e2c0c86ff0c61b144872e6155579
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/20220504011345.662299-3-Liam.Howlett@oracle.com
Link: https://lkml.kernel.org/r/20220621204632.3370049-19-Liam.Howlett@oracle.com
Link: https://lkml.kernel.org/r/20220720021727.17018-19-Liam.Howlett@oracle.com
Signed-off-by: Liam R. Howlett <Liam.Howlett@oracle.com>
Cc: Catalin Marinas <catalin.marinas@arm.com>
Cc: David Howells <dhowells@redhat.com>
Cc: "Matthew Wilcox (Oracle)" <willy@infradead.org>
Cc: SeongJae Park <sj@kernel.org>
Cc: Vlastimil Babka <vbabka@suse.cz>
Cc: Will Deacon <will@kernel.org>
Cc: Davidlohr Bueso <dave@stgolabs.net>
Cc: David Hildenbrand <david@redhat.com>
Cc: Hulk Robot <hulkci@huawei.com>
Cc: Lukas Bulwahn <lukas.bulwahn@gmail.com>
Cc: Sven Schnelle <svens@linux.ibm.com>
Cc: Yang Yingliang <yangyingliang@huawei.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
mm/mmap.c