STRUCT DAMOS_FILTER(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

🌸 NAME 🌸

okay bestie, this is the struct damos_filter(9) page from the Kernel API Manual 😌✨. The whole entire vibe is: struct damos_filter - DAMOS action target memory filter. iconic, honestly.


✨ SYNOPSIS ✨

Here's the struct in all its glory, no cap:

       struct damos_filter {
           enum damos_filter_type type;
           bool matching;
           bool allow;
           union {
             u64 memcg_id;
             struct damon_addr_range addr_range;
             int target_idx;
             struct damon_size_range sz_range;
           };
        };

🧚 Members 🧚

  • type β€” Type of the target memory. 🎯
  • matching β€” Whether this is for type-matching memory. 🧐
  • allow β€” Whether to include or exclude the matching memory. βœ…
  • {unnamed_union} β€” anonymous. literally no name, just vibes πŸ™ˆ
  • memcg_id β€” Memcg id of the question if type is DAMOS_FILTER_MEMCG. 🫢
  • addr_range β€” Address range if type is DAMOS_FILTER_TYPE_ADDR. πŸ“
  • target_idx β€” Index of the struct damon_target of damon_ctx->adaptive_targets if type is DAMOS_FILTER_TYPE_TARGET. 🎯
  • sz_range β€” Size range if type is DAMOS_FILTER_TYPE_HUGEPAGE_SIZE. πŸ“

πŸ”₯ Description πŸ”₯

So before applying damos->action to a memory region, DAMOS checks if each byte of the region matches to this given condition β€” and if so, it avoids applying the action. literally a byte-by-byte vibe check. πŸ‘€

Support of each filter type depends on the running struct damon_operations and the type. so the ops + type combo is lowkey important, bestie. Refer to enum damos_filter_type for more details. ✨


πŸ’– SEE ALSO πŸ’–

Kernel file ./include/linux/damon.h β€” go read, bestie, the whole squad is there:

  • 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_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)

okay that's the whole page, mwah πŸ’‹ β€” footer tea: source/version ./include/linux, date October 2026, page struct damos_filter(9). periodt. 🌈

πŸ“¦ where this page comes from