summaryrefslogtreecommitdiffstats
path: root/mm
diff options
context:
space:
mode:
authorSeongJae Park <sj@kernel.org>2022-09-13 17:44:28 +0000
committerAndrew Morton <akpm@linux-foundation.org>2022-10-03 14:03:09 -0700
commitf82e70e26b505cd8a1d5c670dc5038a938708d4a (patch)
tree873fcba8db8a3be0c084cb92398458be0c7da7b1 /mm
parent3791bc7bf1034dcce89541e54630d0307cc199fb (diff)
downloadlinux-f82e70e26b505cd8a1d5c670dc5038a938708d4a.tar.gz
linux-f82e70e26b505cd8a1d5c670dc5038a938708d4a.tar.bz2
linux-f82e70e26b505cd8a1d5c670dc5038a938708d4a.zip
mm/damon/paddr: make supported DAMOS actions of paddr clear
Patch series "mm/damon: cleanup code". DAMON code was not so clean from the beginning, but it has been too much nowadays, especially due to the duplicates in DAMON_RECLAIM and DAMON_LRU_SORT. This patchset cleans some of the mess. This patch (of 22): The 'switch-case' statement in 'damon_va_apply_scheme()' function provides a 'case' for every supported DAMOS action while all not-yet-supported DAMOS actions fall through the 'default' case, and comment it so that people can easily know which actions are supported. Its counterpart in 'paddr', 'damon_pa_apply_scheme()', however, doesn't. This commit makes the 'paddr' side function follows the pattern of 'vaddr' for better readability and consistency. Link: https://lkml.kernel.org/r/20220913174449.50645-1-sj@kernel.org Link: https://lkml.kernel.org/r/20220913174449.50645-2-sj@kernel.org Signed-off-by: SeongJae Park <sj@kernel.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Diffstat (limited to 'mm')
-rw-r--r--mm/damon/paddr.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/mm/damon/paddr.c b/mm/damon/paddr.c
index 6b0d9e6aa677..219127cb49e2 100644
--- a/mm/damon/paddr.c
+++ b/mm/damon/paddr.c
@@ -275,7 +275,10 @@ static unsigned long damon_pa_apply_scheme(struct damon_ctx *ctx,
return damon_pa_mark_accessed(r);
case DAMOS_LRU_DEPRIO:
return damon_pa_deactivate_pages(r);
+ case DAMOS_STAT:
+ break;
default:
+ /* DAMOS actions that not yet supported by 'paddr'. */
break;
}
return 0;