STRUCT DAMON_ATTRS(9)
πΈ struct damon_attrs(9) πΈ
okay so this is the Kernel API Manual page for struct damon_attrs β literally the monitoring attributes for accuracy/overhead control. bestie, this is the struct that decides how often DAMON peeks at your memory and how hard it works π
β¨ SYNOPSIS β¨
struct damon_attrs {
unsigned long sample_interval;
unsigned long aggr_interval;
unsigned long ops_update_interval;
struct damon_intervals_goal intervals_goal;
unsigned long min_nr_regions;
unsigned long max_nr_regions;
};
it's giving "small struct, big job" energy, ngl π«Ά
π Members π
sample_intervalβ the time between access samplings. like, how often we go "hmm, is this region being touched?" πaggr_intervalβ the time between monitor results aggregations. the number-crunching window, basically.ops_update_intervalβ the time between monitoring operations updates. how often the ops get a little refresh β¨intervals_goalβ the intervals auto-tuning goal. set it and let DAMON tune its own intervals, main character energy fr.min_nr_regionsβ the minimum number of adaptive monitoring regions. the floor, no going below it πmax_nr_regionsβ the maximum number of adaptive monitoring regions. the ceiling, no going above it π
π Description π
okay so here's the whole vibe. for each sample_interval, DAMON checks whether each region is accessed or not during the last sample_interval. if such access is found, DAMON aggregates the information by increasing damon_region->nr_accesses for aggr_interval time. for each aggr_interval, the count is reset. π₯
DAMON also checks whether the target memory regions need update (e.g., by mmap calls from the application, in case of virtual memory monitoring) and applies the changes for each ops_update_interval. π¦
π heads up: all time intervals are in micro-seconds. yes, micro. not milli. do not come for me.
please refer to struct damon_operations and struct damon_call_control for more detail β they have the rest of the lore, iykyk πβ¨
β SEE ALSO β
kernel file ./include/linux/damon.h, plus the whole extended universe bestie:
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), struct damon_intervals_goal(9), enum damon_filter_type(9), struct damon_filter(9), struct damon_probe(9), struct damon_ctx(9)
that's a whole friend group right there, it's giving reunion tour πΈπ
and that's the page!! sign-off time π β this little beauty lives under ./include/linux, dated October 2026, and it's struct damon_attrs(9) all day. slay, go tune those intervals bestie β¨π
π¦ where this page comes from
- nixpkgs unstable: linux-manual 7.3.1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms