STRUCT DAMOS_STAT(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

✨ 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_PAGEOUT and 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