STRUCT DAMON_TARGET(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

🌸 NAME 🌸

okay so welcome to the struct damon_target(9) page of the Kernel API Manual, bestie β€” this one is literally just about one thing: struct damon_target, and it Represents a monitoring target. that's it, that's the whole vibe πŸ’…


✨ SYNOPSIS ✨

here's the whole struct, and yes it's tiny, she's lowkey an icon for that:

struct damon_target {
    struct pid *pid;
    bool obsolete;
 };

πŸŽ€ MEMBERS πŸŽ€

  • pid β€” the PID of the virtual address space you wanna monitor 🫢 like, that's the thing being watched, periodt.
  • obsolete β€” a lil bool that says whether the commit destination target is obsolete. note the "destination" part, it matters, iykyk πŸ‘€

πŸ’œ DESCRIPTION πŸ’œ

okay so picture this: each monitoring context could have multiple targets. not just one. multiple. for example β€” and this is the textbook case β€” a context for virtual memory address spaces could have multiple target processes running at once 🌈

the pid field should be set for the appropriate struct damon_operations, and that includes the virtual address spaces monitoring operations. so like, if that's your ops type, pid is your moment to shine ✨

now obsolete β€” and this is the important bit, don't skip it πŸ™ˆ β€” is used only for damon_commit_targets source targets. its whole job is to specify that the matching destination targets are obsolete. that's it. that's her only purpose. if you wanna see how it's actually handled, go read damon_commit_targets β€” the manpage said so, not me πŸŽ€

no cap: obsolete is scoped to damon_commit_targets source targets specifically. don't go slapping it on random stuff and expecting magic, bestie 😭

πŸ¦‹ SEE ALSO πŸ¦‹

kernel file ./include/linux/damon.h, plus the whole DAMON cinematic universe β€” go off, queen πŸ‘‘:

  • struct damon_addr_range(9)
  • struct damon_size_range(9)
  • struct damon_region(9)
  • enum damos_action(9)
  • enum damos_quota_goal_metric(9)
  • struct damos_quota_goal(9)
  • enum damos_quota_goal_tuner(9)
  • struct damos_quota(9)
  • enum damos_wmark_metric(9)
  • struct damos_watermarks(9)
  • struct damos_stat(9)
  • enum damos_filter_type(9)
  • struct damos_filter(9)
  • struct damos_walk_control(9)
  • struct damos_access_pattern(9)
  • struct damos_migrate_dests(9)
  • struct damos(9)
  • enum damon_ops_id(9)
  • struct damon_operations(9)
  • struct damon_intervals_goal(9)
  • enum damon_filter_type(9)
  • struct damon_filter(9)
  • struct damon_probe(9)
  • struct damon_attrs(9)
  • struct damon_ctx(9)

and that's the page!! πŸ₯³ mwah, kisses, go monitor some targets responsibly πŸ’–

this whole thing lives in ./include/linux, dated October 2026, in the grand tradition of struct damon_target(9) β€” slay, bye πŸŽ€πŸ’œ

πŸ“¦ where this page comes from