]> www.infradead.org Git - users/jedix/linux-maple.git/commit
mm: optimize find_exact_vma() to use vma_lookup()
authorLiam R. Howlett <Liam.Howlett@Oracle.com>
Wed, 20 Jul 2022 02:17:50 +0000 (02:17 +0000)
committerLiam R. Howlett <Liam.Howlett@oracle.com>
Wed, 3 Aug 2022 18:17:05 +0000 (14:17 -0400)
commit5a183a1d27b6a7edf05f92f9b165e93c2e648ece
treeebfe5ea641f8b7b8793783d1793962221a43499a
parent11787386b505ed2055178fb48f8db896cbe6b7cc
mm: optimize find_exact_vma() to use vma_lookup()

Use vma_lookup() to walk the tree to the start value requested.  If the
vma at the start does not match, then the answer is NULL and there is no
need to look at the next vma the way that find_vma() would.

Link: https://lkml.kernel.org/r/20220504011345.662299-5-Liam.Howlett@oracle.com
Link: https://lkml.kernel.org/r/20220621204632.3370049-21-Liam.Howlett@oracle.com
Link: https://lkml.kernel.org/r/20220720021727.17018-21-Liam.Howlett@oracle.com
Signed-off-by: Liam R. Howlett <Liam.Howlett@Oracle.com>
Reviewed-by: Vlastimil Babka <vbabka@suse.cz>
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: 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>
include/linux/mm.h