STRUCT DAMON_INTERVALS_GOAL(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… struct damon_intervals_goal(9) πŸ’…

okay so this is straight out of the Kernel API Manual, bestie β€” it's the page for struct damon_intervals_goal, and it's basically the vibe-check settings for DAMON's auto-tuning of monitoring intervals. ngl it's short but it ate. πŸŽ€


✨ NAME ✨

struct damon_intervals_goal β€” the Monitoring intervals auto-tuning goal. literally the "what am I even aiming for" struct. 🎯


πŸ¦‹ SYNOPSIS πŸ¦‹

struct damon_intervals_goal {
    unsigned long access_bp;
    unsigned long aggrs;
    unsigned long min_sample_us;
    unsigned long max_sample_us;
};

four fields, zero fluff. she's compact and she knows it. πŸ’œ


🌸 Members 🌸

  • access_bp β€” the Access events observation ratio you want to achieve, in bp. this is the goal, the dream, the target. ✨
  • aggrs β€” how many aggregations you get to achieve access_bp within. the deadline, basically. ⏳
  • min_sample_us β€” the Minimum resulting sampling interval, in microseconds. the floor, the "don't go below this" line. πŸ™ˆ
  • max_sample_us β€” the Maximum resulting sampling interval, in microseconds. the ceiling, the "don't go above this" line. πŸš€

πŸ”₯ Description πŸ”₯

so here's the tea: DAMON automatically tunes damon_attrs->sample_interval and damon_attrs->aggr_interval, aiming for the ratio β€” in bp (that's 1/10,000, iykyk) β€” of DAMON-observed access events to the theoretical maximum amount within aggrs aggregations to be the same as access_bp. πŸ‘‘

the logic is honestly kind of iconic: for each aggrs aggregations, if the current access events observation ratio is lower than the target, it increases damon_attrs->aggr_interval and damon_attrs->sampling_interval in the same ratio. and if it's higher? vice versa, bestie. goes the other way. βš–οΈ

🚨 important one: if aggrs is zero, the tuning is disabled and hence this whole struct is ignored. like, completely ghosted. don't come for her if she does nothing when aggrs is 0. πŸ’€

🌈 SEE ALSO 🌈

Kernel file ./include/linux/damon.h, plus the whole friend group:

  • struct damon_addr_range(9)
  • struct damon_size_range(9)
  • struct damon_region(9)
  • struct damon_target(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)
  • 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 whole page, periodt. πŸ’– this one lives in ./include/linux, dated October 2026, and it's filed under struct damon_intervals_goal(9) β€” go read the rest of the kernel docs, bestie, they're lowkey obsessed with you. 🫢✨

πŸ“¦ where this page comes from