ENUM DAMOS_ACTION(9)

๐Ÿ“ฆ version 7.3.1, in nixpkgs unstable

๐Ÿ’… enum damos_action(9) โ€” Kernel API Manual ๐ŸŽ€

okay bestie, so this page is from the Kernel API Manual, and it's all about enum damos_action โ€” which, no cap, is the whole menu of moves a DAMOS (that's Data Access Monitoring-based Operation Scheme) can actually pull off. โœจ


๐ŸŒธ NAME ๐ŸŒธ

enum damos_action โ€” literally represents an action of a Data Access Monitoring-based Operation Scheme. That's it, that's the vibe. ๐Ÿซถ


๐Ÿฆ‹ SYNOPSIS ๐Ÿฆ‹

enum damos_action {
    DAMOS_WILLNEED ,
    DAMOS_COLD ,
    DAMOS_PAGEOUT ,
    DAMOS_HUGEPAGE ,
    DAMOS_NOHUGEPAGE ,
    DAMOS_COLLAPSE ,
    DAMOS_LRU_PRIO ,
    DAMOS_LRU_DEPRIO ,
    DAMOS_MIGRATE_HOT ,
    DAMOS_MIGRATE_COLD ,
    DAMOS_STAT ,
    NR_DAMOS_ACTIONS

};

โญ Constants โญ

okay so here's the whole cast, main character by main character ๐Ÿ‘‘

  • DAMOS_WILLNEED โ€” calls madvise on the region with MADV_WILLNEED. she's saying "hey, we're gonna need this soon" ๐Ÿ”ฎ
  • DAMOS_COLD โ€” calls madvise on the region with MADV_COLD. marking it as, wellโ€ฆ not the moment ๐ŸงŠ
  • DAMOS_PAGEOUT โ€” reclaims the region. bye bye bestie ๐Ÿ‘‹
  • DAMOS_HUGEPAGE โ€” calls madvise on the region with MADV_HUGEPAGE. big pages energy ๐Ÿ˜
  • DAMOS_NOHUGEPAGE โ€” calls madvise on the region with MADV_NOHUGEPAGE. big pages, but make it no ๐Ÿ™…โ€โ™€๏ธ
  • DAMOS_COLLAPSE โ€” calls madvise on the region with MADV_COLLAPSE. squishing it all together, iconic ๐Ÿซ‚
  • DAMOS_LRU_PRIO โ€” prioritizes the region on its LRU lists. glow-up, ranking edition ๐Ÿ’–
  • DAMOS_LRU_DEPRIO โ€” deprioritizes the region on its LRU lists. demoted, but make it fashion ๐Ÿ˜ญ
  • DAMOS_MIGRATE_HOT โ€” migrates the regions, prioritizing warmer regions. moving the hot girlies first ๐Ÿ”ฅ
  • DAMOS_MIGRATE_COLD โ€” migrates the regions, prioritizing colder regions. moving the chill ones first ๐ŸŒจ๏ธ
  • DAMOS_STAT โ€” does absolutely nothing except count the stat. literally just standing there, observing, taking notes ๐Ÿ“Š
  • NR_DAMOS_ACTIONS โ€” the total number of DAMOS actions. the headcount, the roster size ๐Ÿงฎ

๐Ÿ’œ Description ๐Ÿ’œ

so here's the tea: whether each action is actually supported is entirely up to whichever struct damon_operations is running at the time. it's giving "depends on the group chat you're in." ๐Ÿซ 

if you wanna know the real support status for each one, go check the 'Operation Action' section of Documentation/mm/damon/design.rst โ€” that's the receipts, iykyk. ๐Ÿ“š

โš ๏ธ lowkey important: note that DAMOS_PAGEOUT doesn't trigger demotions. not a demotion, no cap. don't @ me.

๐ŸŒˆ SEE ALSO ๐ŸŒˆ

the whole friend group, in the 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_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_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 page!! ๐Ÿ’… this little beauty lives in ./include/linux and it's dated October 2026 โ€” so yeah, she's from the future, slay. mwah, go read your structs bestie ๐ŸŽ€โœจ๐Ÿ’–

๐Ÿ“ฆ where this page comes from