STRUCT DAMOS_STAT(9)
β¨ struct damos_stat(9) β¨
okay so bestie, welcome to the Kernel API Manual π β this is the whole entire page about struct damos_stat, and trust, it's lowkey iconic once you get the vibe.
π NAME π
struct damos_stat β literally just statistics on a given scheme. that's it. that's the tweet. π
πΈ SYNOPSIS πΈ
struct damos_stat {
unsigned long nr_tried;
unsigned long sz_tried;
unsigned long nr_applied;
unsigned long sz_applied;
unsigned long sz_ops_filter_passed;
unsigned long qt_exceeds;
unsigned long nr_snapshots;
};
yes queen, seven unsigned long fields and a dream β¨ (and yeah, the original really does have that one extra space before the closing }; β we keep it, we don't touch the sacred text π«Ά)
π Members π
nr_triedβ total number of regions that the scheme is tried to be applied to. the "we gave it a shot" counter fr fr.sz_triedβ total size of the regions that the scheme is tried to be applied to. same energy, but measured in bytes instead of bodies.nr_appliedβ total number of regions that the scheme actually is applied to. the glow-up count πsz_appliedβ total size of the regions that the scheme is applied to. slay in bytes.sz_ops_filter_passedβ total bytes that passed ops layer-handled DAMOS filters. the survivors πqt_exceedsβ total number of times the quota of the scheme has exceeded. not me, not the quota πnr_snapshotsβ total number of DAMON snapshots that the scheme has tried. main character snapshots only πΈ
π¦ Description π¦
so like, when we say "tried an action to a region" in this context, what we mean is that the DAMOS core logic determined the region as eligible to apply the action. periodt. β¨ and a whole bunch of stuff can affect that verdict: the access pattern (struct damos_access_pattern), quotas (struct damos_quota), watermarks (struct damos_watermarks), and filters (struct damos_filter) that are handled on core logic. after all that, the core logic asks the operation set (struct damon_operations) to apply the action to the region. it's giving delegation, honestly.
and when we say "applied an action to a region", that means the operation set (struct damon_operations) successfully applied the action to the region β or at least to a part of the region π«Ά. what can affect this one? the filters (struct damos_filter) handled on the operation set layer, the type of the action, and the pages of the region. iykyk.
for example (and these are the receipts π§Ύ):
- if a filter is set to exclude anonymous pages and the region has only anonymous pages, the region will be failed at applying the action. rough π
- if the action is
DAMOS_PAGEOUTand all pages of the region are already paged out, the region will be failed at applying the action.
no cap, that's the whole mechanic.
π₯ SEE ALSO π₯
Kernel file ./include/linux/damon.h β and then the whole group chat:
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), 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)
ok that's the whole page, go be obsessed with your stats bestie π
and that's a wrap! brought to you straight out of ./include/linux, dated October 2026, and officially filed under struct damos_stat(9) β mwah ππ·
π¦ 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