mm/damon/vaddr: generalize damon_va_apply_three_regions()
authorSeongJae Park <sj@kernel.org>
Tue, 10 May 2022 01:20:54 +0000 (18:20 -0700)
committerAndrew Morton <akpm@linux-foundation.org>
Fri, 13 May 2022 14:20:08 +0000 (07:20 -0700)
commitaf3f18f6ad3f3c8ae70955cf288f467ea2bc83ed
tree83546e82dcfc0a599fc5f0a34ac026dfb6462903
parentabacd635fa7b7a39858bb4182eef33ffa628b12c
mm/damon/vaddr: generalize damon_va_apply_three_regions()

'damon_va_apply_three_regions()' is for adjusting address ranges to fit in
three discontiguous ranges.  The function can be generalized for arbitrary
number of discontiguous ranges and reused for future usage, such as
arbitrary online regions update.  For such future usage, this commit
introduces a generalized version of the function called
'damon_set_regions()'.

Link: https://lkml.kernel.org/r/20220429160606.127307-4-sj@kernel.org
Signed-off-by: SeongJae Park <sj@kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
mm/damon/vaddr.c