Skip to content

Remove the type-unclear target id concept

SeongJae Park linux-mm lkml 1 version Applied

Status from this message: [merged] mm-damon-dbgfs-init_regions-use-target-index-instead-of-target-id.patch removed from -mm tree

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest4 patches 2 repliesApplied 4/4

Patches in v1 All 4 applied

#Subject and filesSizeRepliesApplied
1/4mm/damon/dbgfs/init_regions: Use target index instead of target idmm/damon/dbgfs-test.h mm/damon/dbgfs.c+22 -230 repliesApplied
2/4Docs/admin-guide/mm/damon/usage: Update for changed initail_regions file inputDocumentation/admin-guide/mm/damon/usage.rst+14 -100 repliesApplied
3/4mm/damon/core: Move damon_set_targets() into dbgfsinclude/linux/damon.h mm/damon/core-test.h mm/damon/core.c +2 more+52 -540 repliesApplied
4/4mm/damon: Remove the target id conceptinclude/linux/damon.h mm/damon/core-test.h mm/damon/core.c +5 more+133 -1280 repliesApplied

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [PATCH 0/4] Remove the type-unclear 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 patchset removes the concept and uses clear type definition.

[1] https://lore.kernel.org/linux-mm/[email protected]/

SeongJae Park (4):
mm/damon/dbgfs/init_regions: Use target index instead of target id Docs/admin-guide/mm/damon/usage: Update for changed initail_regions
file input
mm/damon/core: Move damon_set_targets() into dbgfs mm/damon: Remove the target id concept

 Documentation/admin-guide/mm/damon/usage.rst |  24 ++-
 include/linux/damon.h                        |  13 +-
 mm/damon/core-test.h                         |  21 +-
 mm/damon/core.c                              |  36 +---
 mm/damon/dbgfs-test.h                        |  83 +++-----
 mm/damon/dbgfs.c                             | 202 ++++++++++++-------
 mm/damon/reclaim.c                           |   3 +-
 mm/damon/vaddr-test.h                        |   6 +-
 mm/damon/vaddr.c                             |   4 +-
 9 files changed, 199 insertions(+), 193 deletions(-)
Signature · 1 line
2.17.1