STRUCT DAMOS_QUOTA_GOAL(9)
β¨ struct damos_quota_goal(9) β the Kernel API Manual glow-up β¨
okay so bestie, we're in the Kernel API Manual and today's main character is a struct with a goal β literally, it's in the name. sit down, hydrate, and let's get into it π«Ά
πΈ NAME πΈ
struct damos_quota_goal β the DAMOS scheme quota auto-tuning goal. that's it, that's the vibe. π
π SYNOPSIS π
struct damos_quota_goal {
enum damos_quota_goal_metric metric;
unsigned long target_value;
unsigned long current_value;
union {
struct {
int nid;
u64 memcg_id;
};
};
};
look at her. flawless. no notes. β¨
π¦ Members π¦
metricβ the metric we're using to represent the goal. it's giving "what are we even measuring bestie" πtarget_valueβ the target value of the metric you wanna achieve with the tuning. the dream. the aspiration. the ~goals~ (literally).current_valueβ the current value of the metric. where we're at rn. reality check energy. π{unnamed_union}β anonymous. mysterious. doesn't need a name to slay. π{unnamed_struct}β also anonymous. also iconic.nidβ node id. that's the whole thing, no cap. πΈmemcg_idβ memcg id. same deal. β¨
π₯ Description π₯
so this is the data structure for getting the current score of the quota tuning goal. the score is calculated by how close current_value and target_value are β like, how near are we to the goal, you know? then that score gets entered into DAMON's internal feedback loop mechanism to get the auto-tuned quota. it's a whole ecosystem and she's thriving. π
if metric is DAMOS_QUOTA_USER_INPUT, then current_value should be manually entered by the user, probably inside the kdamond callbacks. otherwise? DAMON sets current_value with the self-measured value of metric. she's independent like that. π
if metric is DAMOS_QUOTA_NODE_MEM_{USED,FREE}_BP, then nid represents the node id of the target node to account the used/free memory. π§
if metric is DAMOS_QUOTA_NODE_MEMCG_{USED,FREE}_BP, then nid and memcg_id represent the node id and the cgroup to account the used memory for. precision. we love to see it. β
ngl bestie, the{USED,FREE}and{USED,FREE}_BPbraces in those metric names are shorthand for the variants β read them exactly as written above, no improvisation. π
π SEE ALSO π
Kernel file ./include/linux/damon.h, plus the whole friend group:
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)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_attrs(9)struct damon_ctx(9)
and that's the whole page, bestie!! this lil gem lives in ./include/linux and the page is dated October 2026, filed under struct damos_quota_goal(9) β go forth and tune those quotas, you absolute icon πβ¨π
π¦ 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