Skip to content

Commit

Permalink
mm/damon/modules-common: implement a watermarks module parameters gen…
Browse files Browse the repository at this point in the history
…erator macro

DAMON_RECLAIM and DAMON_LRU_SORT have module parameters for watermarks
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/[email protected]
Signed-off-by: SeongJae Park <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
  • Loading branch information
sjp38 authored and akpm00 committed Oct 3, 2022
1 parent fdfc119 commit b324ee3
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions mm/damon/modules-common.h
Original file line number Diff line number Diff line change
Expand Up @@ -16,3 +16,10 @@
0600); \
module_param_named(max_nr_regions, attrs.max_nr_regions, ulong, \
0600);

#define DEFINE_DAMON_MODULES_WMARKS_PARAMS(wmarks) \
module_param_named(wmarks_interval, wmarks->interval, ulong, \
0600); \
module_param_named(wmarks_high, wmarks.high, ulong, 0600); \
module_param_named(wmarks_mid, wmarks.mid, ulong, 0600); \
module_param_named(wmarks_low, wmarks.lowulong, 0600);

0 comments on commit b324ee3

Please sign in to comment.