]> 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>
Mon, 22 Aug 2022 15:03:16 +0000 (15:03 +0000)
committerAndrew Morton <akpm@linux-foundation.org>
Mon, 22 Aug 2022 22:58:21 +0000 (15:58 -0700)
commit5bd2dd86a506aec7ea613400ac8d7b6ff9a312e5
tree73643d05c41c0bb57f03f9f0d718c639c4797d52
parent9dfde0cc970a703142cc5f5925fcdfe131910279
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.

Link: https://lkml.kernel.org/r/20220822150128.1562046-16-Liam.Howlett@oracle.com
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>
Reviewed-by: David Hildenbrand <david@redhat.com>
Cc: Catalin Marinas <catalin.marinas@arm.com>
Cc: David Howells <dhowells@redhat.com>
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>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
mm/damon/vaddr-test.h
mm/damon/vaddr.c