STRUCT DAMOS_FILTER(9)
πΈ 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 iftypeisDAMOS_FILTER_MEMCG. π«Άaddr_rangeβ Address range iftypeisDAMOS_FILTER_TYPE_ADDR. πtarget_idxβ Index of thestruct damon_targetofdamon_ctx->adaptive_targetsiftypeisDAMOS_FILTER_TYPE_TARGET. π―sz_rangeβ Size range iftypeisDAMOS_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
- 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