STRUCT DAMOS_WATERMARKS(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’§ struct damos_watermarks(9) πŸ’§

okay bestie, welcome to the Kernel API Manual ✨ β€” this one's all about struct damos_watermarks, and honestly? it's giving "little struct that decides when your scheme gets to be the main character." let's get into it 🫢


🌸 NAME 🌸

struct damos_watermarks β€” literally the controls for when a given scheme should be activated. that's the whole vibe. no cap.


✨ SYNOPSIS ✨

struct damos_watermarks {
    enum damos_wmark_metric metric;
    unsigned long interval;
    unsigned long high;
    unsigned long mid;
    unsigned long low;
 };

like, look at her. five fields. iconic. πŸ’…


πŸŽ€ Members πŸŽ€

  • metric β€” the metric for the watermarks. the thing we're actually measuring, iykyk πŸ¦‹
  • interval β€” watermarks check time interval, in microseconds. yes, microseconds. she's precise like that ⏱️
  • high β€” the high watermark πŸ”₯
  • mid β€” the middle watermark 🌈
  • low β€” the low watermark πŸ’€

🧚 Description 🧚

so here's the tea β˜• β€” if metric is DAMOS_WMARK_NONE, the scheme is always active. and being active means DAMON does monitoring and applies the action of the scheme to appropriate memory regions. periodt. πŸŽ€

else (as in, not DAMOS_WMARK_NONE, bestie), DAMON checks metric of the system for at least every interval microseconds, and works like this:

  • if metric is higher than high, the scheme is inactivated πŸ™ˆ
  • if metric is between mid and low, the scheme is activated ✨
  • if metric is lower than low, the scheme is inactivated 😭

literally three little rules and she's running the whole vibe check. obsessed. πŸ’œ


πŸ”Ž SEE ALSO πŸ”Ž

kernel file ./include/linux/damon.h πŸ“

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_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 🫢 β€” sourced from ./include/linux, dated October 2026, and she's still struct damos_watermarks(9) at the end of the day. slay πŸ’…βœ¨πŸŽ€

πŸ“¦ where this page comes from