]> 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>
Wed, 11 May 2022 13:09:53 +0000 (09:09 -0400)
commiteb2994d524808b714951a21bb667ac31efadd07a
treed09f9ab523e2764505858b08f499f6e7e2971b76
parent84d9c2785e8d4aadd615e4f61cf86d4ed58ae66b
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>
Reviewed-by: SeongJae Park <sj@kernel.org>
mm/damon/vaddr-test.h
mm/damon/vaddr.c