Commit 528ef2d9 authored by SeongJae Park's avatar SeongJae Park Committed by Andrew Morton

mm/damon/modules-common: implement a stats parameters generator macro

DAMON_RECLAIM and DAMON_LRU_SORT have module parameters for DAMOS
statistics that having same names.  This commit implements a macro for
generating such module parameters so that we can reuse later.

Link: https://lkml.kernel.org/r/20220913174449.50645-16-sj@kernel.orgSigned-off-by: default avatarSeongJae Park <sj@kernel.org>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
parent 34f47ea6
......@@ -23,3 +23,15 @@
module_param_named(wmarks_high, wmarks.high, ulong, 0600); \
module_param_named(wmarks_mid, wmarks.mid, ulong, 0600); \
module_param_named(wmarks_low, wmarks.low, ulong, 0600);
#define DEFINE_DAMON_MODULES_DAMOS_STATS_PARAMS(stat, try_name, \
succ_name, qt_exceed_name) \
module_param_named(nr_##try_name, stat.nr_tried, ulong, 0400); \
module_param_named(bytes_##try_name, stat.sz_tried, ulong, \
0400); \
module_param_named(nr_##succ_name, stat.nr_applied, ulong, \
0400); \
module_param_named(bytes_##succ_name, stat.sz_applied, ulong, \
0400); \
module_param_named(qt_exceed_name, stat.qt_exceeds, ulong, \
0400);
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment