diff options
author | SeongJae Park <sj@kernel.org> | 2022-09-13 20:44:28 +0300 |
---|---|---|
committer | Andrew Morton <akpm@linux-foundation.org> | 2022-10-04 00:03:09 +0300 |
commit | f82e70e26b505cd8a1d5c670dc5038a938708d4a (patch) | |
tree | 873fcba8db8a3be0c084cb92398458be0c7da7b1 | |
parent | 3791bc7bf1034dcce89541e54630d0307cc199fb (diff) | |
download | linux-f82e70e26b505cd8a1d5c670dc5038a938708d4a.tar.xz |
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>
-rw-r--r-- | mm/damon/paddr.c | 3 |
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; |