damon_set_re...rams_default(9)
π damon_set_re...rams_default(9)
okay bestie, this one's a Kernel API Manual page, and it's literally the glow-up function for DAMON regions β¨ It's called damon_set_re...rams_default, and it's giving "set my region exactly how I asked, or just cover all of System RAM, no thoughts, head empty" π
πΈ NAME πΈ
damon_set_region_system_rams_default β sets the region of the monitoring target you hand it, either exactly as requested, or (plot twist) to cover all 'System RAM' resources π
β¨ SYNOPSIS β¨
int damon_set_region_system_rams_default (struct damon_target *t ,
unsigned long *start , unsigned long *end , unsigned long addr_unit ,
unsigned long min_region_sz );
π«Ά ARGUMENTS π«Ά
tβ the monitoring target whose region we're setting. the main character of this whole operation tbh πstartβ pointer to the start address of the region πendβ pointer to the end address of the region πaddr_unitβ the address unit for thedamon_ctxoft. yes, specifically that target's ctx, iykyk π¦min_region_szβ the minimum region size. tiny regions need not apply π
π DESCRIPTION π
so here's the tea β this function sets the region of t exactly as requested by start and end. slay, straightforward, iconic.
but β and this is the fun part β if the values of start and end are both zero, it doesn't just sit there doing nothing. nope. it goes and finds 'System RAM' resources and sets the region to cover all the resources π₯ big "cover the whole map" energy, fr fr.
and in that latter case (the zero-zero situation), it saves the start and end addresses of the first and last resources into start and end, respectively β¨ so you get the real boundaries back through the same pointers you gave it. efficient. thoughtful. we love her π
π RETURN π
0on success π- a negative error code otherwise π (not a vibe, but it happens)
π§ SEE ALSO π§
Kernel file ./mm/damon/core.c:
damon_is_registered_ops(9)damon_register_ops(9)damon_select_ops(9)damon_nr_accesses_mvsum(9)damon_probe_hits_wsum(9)damos_filter_for_ops(9)damon_set_attrs(9)damon_set_schemes(9)damos_commit_quota_goals(9)damos_filters_default_reject(9)damon_commit_ctx(9)damon_nr_running_ctxs(9)damon_start(9)damon_stop(9)damon_is_running(9)damon_kdamond_pid(9)damon_call(9)damos_walk(9)damon_update_region_access_rate(9)damon_initialized(9)
go read them all, bestie, they're all linked β¨
aaaand that's the page! π it lives in ./mm/damon from October 2026 β bookmark it, screenshot it, tell your friends π 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