linux/mm/damon
SeongJae Park 1971bd6304 mm/damon: remove the target id concept
DAMON asks each monitoring target ('struct damon_target') to have one
'unsigned long' integer called 'id', which should be unique among the
targets of same monitoring context.  Meaning of it is, however, totally up
to the monitoring primitives that registered to the monitoring context.
For example, the virtual address spaces monitoring primitives treats the
id as a 'struct pid' pointer.

This makes the code flexible, but ugly, not well-documented, and
type-unsafe[1].  Also, identification of each target can be done via its
index.  For the reason, this commit removes the concept and uses clear
type definition.  For now, only 'struct pid' pointer is used for the
virtual address spaces monitoring.  If DAMON is extended in future so that
we need to put another identifier field in the struct, we will use a union
for such primitives-dependent fields and document which primitives are
using which type.

[1] https://lore.kernel.org/linux-mm/20211013154535.4aaeaaf9d0182922e405dd1e@linux-foundation.org/

Link: https://lkml.kernel.org/r/20211230100723.2238-5-sj@kernel.org
Signed-off-by: SeongJae Park <sj@kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2022-03-22 15:57:12 -07:00
..
core-test.h mm/damon: remove the target id concept 2022-03-22 15:57:12 -07:00
core.c mm/damon: remove the target id concept 2022-03-22 15:57:12 -07:00
dbgfs-test.h mm/damon: remove the target id concept 2022-03-22 15:57:12 -07:00
dbgfs.c mm/damon: remove the target id concept 2022-03-22 15:57:12 -07:00
Kconfig mm/damon: introduce DAMON-based Reclamation (DAMON_RECLAIM) 2021-11-06 13:30:46 -07:00
Makefile mm/damon: introduce DAMON-based Reclamation (DAMON_RECLAIM) 2021-11-06 13:30:46 -07:00
paddr.c mm/damon/schemes: account scheme actions that successfully applied 2022-01-15 16:30:32 +02:00
prmtv-common.c mm/damon/vaddr,paddr: support pageout prioritization 2021-11-06 13:30:45 -07:00
prmtv-common.h mm/damon: move damon_rand() definition into damon.h 2022-01-15 16:30:32 +02:00
reclaim.c mm/damon: remove the target id concept 2022-03-22 15:57:12 -07:00
vaddr-test.h mm/damon: remove the target id concept 2022-03-22 15:57:12 -07:00
vaddr.c mm/damon: remove the target id concept 2022-03-22 15:57:12 -07:00