mm/damon/paddr: implement damon_folio_mkold()
authorSeongJae Park <sj@kernel.org>
Fri, 26 Apr 2024 19:52:41 +0000 (12:52 -0700)
committerAndrew Morton <akpm@linux-foundation.org>
Mon, 6 May 2024 00:53:54 +0000 (17:53 -0700)
commit6daea38215e6a046892f87a8ff2c61f791de4ddd
treef0769b7d68af3a551f52adec099488877988b2e0
parent180d928e55a8160a421aa96b522dc317a6f52140
mm/damon/paddr: implement damon_folio_mkold()

damon_pa_mkold() receives physical address, get the folio covering the
address, and makes the folio as old.  A following commit will reuse the
internal logic for marking a given folio as old.  To avoid duplication of
the code, split the internal logic.  Also, change the rmap walker
function's name from __damon_pa_mkold() to damon_folio_mkold_one(),
following the change of the caller's name and the naming rule that more
commonly used by other rmap walkers.

Link: https://lkml.kernel.org/r/20240426195247.100306-3-sj@kernel.org
Signed-off-by: SeongJae Park <sj@kernel.org>
Tested-by: Honggyu Kim <honggyu.kim@sk.com>
Cc: Jonathan Corbet <corbet@lwn.net>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
mm/damon/paddr.c