]> www.infradead.org Git - users/jedix/linux-maple.git/commit
damon: Convert __damon_va_three_regions to use the VMA iterator
authorLiam R. Howlett <Liam.Howlett@Oracle.com>
Thu, 14 Apr 2022 06:07:14 +0000 (23:07 -0700)
committerLiam R. Howlett <Liam.Howlett@oracle.com>
Tue, 26 Apr 2022 14:36:31 +0000 (10:36 -0400)
commitdefb9a2dc72a5ec68237f8b297291fd2f803e5b6
treeb1abfd4e67b99a58108eb163944e4b84242f87a9
parent3d799c1bcfc3d4c37b0d7e36e651c3954e5cd90d
damon: Convert __damon_va_three_regions to use the VMA iterator

This rather specialised walk can use the VMA iterator.  If this proves to
be too slow, we can write a custom routine to find the two largest gaps,
but it will be somewhat complicated, so let's see if we need it first.

Update the kunit test case to use the maple tree.  This also fixes an
issue with the kunit testcase not adding the last VMA to the list.

Fixes: 17ccae8bb5c9 (mm/damon: add kunit tests)
Signed-off-by: Liam R. Howlett <Liam.Howlett@Oracle.com>
Signed-off-by: Matthew Wilcox (Oracle) <willy@infradead.org>
mm/damon/vaddr-test.h
mm/damon/vaddr.c