aboutsummaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorKaixu Xia <[email protected]>2022-09-20 16:53:22 +0000
committerAndrew Morton <[email protected]>2022-10-03 14:03:31 -0700
commit233f0b31bd9503ce2be7be0bde69c67287c8a741 (patch)
treedb006d9fd3d199616a6e46f245abed6d323535ab /include
parent30b6242c49cd2a98def3bb2feee68d82a0e9686b (diff)
mm/damon: deduplicate damon_{reclaim,lru_sort}_apply_parameters()
The bodies of damon_{reclaim,lru_sort}_apply_parameters() contain duplicates. This commit adds a common function damon_set_region_biggest_system_ram_default() to remove the duplicates. Link: https://lkml.kernel.org/r/[email protected] Signed-off-by: Kaixu Xia <[email protected]> Suggested-by: SeongJae Park <[email protected]> Reviewed-by: SeongJae Park <[email protected]> Signed-off-by: SeongJae Park <[email protected]> Signed-off-by: Andrew Morton <[email protected]>
Diffstat (limited to 'include')
-rw-r--r--include/linux/damon.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/include/linux/damon.h b/include/linux/damon.h
index e7808a84675f..ed5470f50bab 100644
--- a/include/linux/damon.h
+++ b/include/linux/damon.h
@@ -557,7 +557,8 @@ static inline bool damon_target_has_pid(const struct damon_ctx *ctx)
int damon_start(struct damon_ctx **ctxs, int nr_ctxs, bool exclusive);
int damon_stop(struct damon_ctx **ctxs, int nr_ctxs);
-bool damon_find_biggest_system_ram(unsigned long *start, unsigned long *end);
+int damon_set_region_biggest_system_ram_default(struct damon_target *t,
+ unsigned long *start, unsigned long *end);
#endif /* CONFIG_DAMON */