mm/damon/paddr,vaddr: register themselves to DAMON in subsys_initcall
authorSeongJae Park <sj@kernel.org>
Mon, 28 Feb 2022 23:01:51 +0000 (10:01 +1100)
committerStephen Rothwell <sfr@canb.auug.org.au>
Mon, 28 Feb 2022 23:01:51 +0000 (10:01 +1100)
commite1d0ee81d5a3c311b6230884a62b18e40fa80921
tree4484d6a0076f0ecc94579e161a49c4282a718afc
parent4583a6962a9f0a99d83f59714599c5656ea637ac
mm/damon/paddr,vaddr: register themselves to DAMON in subsys_initcall

This commit makes the monitoring operations for the physical address space
and virtual address spaces register themselves to DAMON in the
subsys_initcall step.  Later, in-kernel DAMON user code can use them via
damon_select_ops() without have to unnecessarily depend on all possible
monitoring operations implementations.

Link: https://lkml.kernel.org/r/20220215184603.1479-4-sj@kernel.org
Signed-off-by: SeongJae Park <sj@kernel.org>
Cc: David Rientjes <rientjes@google.com>
Cc: Xin Hao <xhao@linux.alibaba.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
mm/damon/paddr.c
mm/damon/vaddr.c