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/6329f00d.a70a0220.9bb29.3678SMTPIN_ADDED_BROKEN@mx.google.com
Signed-off-by: Kaixu Xia <kaixuxia@tencent.com>
Suggested-by: SeongJae Park <sj@kernel.org>
Reviewed-by: SeongJae Park <sj@kernel.org>
Signed-off-by: SeongJae Park <sj@kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
This commit is contained in:
parent
30b6242c49
commit
233f0b31bd
4 changed files with 42 additions and 22 deletions
|
|
@ -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 */
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue