damos_sysfs...e_region_dir(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… damos_sysfs_populate_region_dir β€” the Kernel API Manual girlies know ✨

okay so bestie, this one lives in the Kernel API Manual (section 9, kernel-space functions, you know the vibe), and the page header is out here looking like damos_sysfs...e_region_dir(9) because it literally ran out of room 😭 β€” but the actual function is damos_sysfs_populate_region_dir, and we're gonna get into it. no cap.


πŸŽ€ NAME πŸŽ€

damos_sysfs_populate_region_dir β€” populates a schemes tried region dir. that's it, that's the whole job. she builds out the directory of regions that a scheme has tried. icon behavior honestly.


πŸ¦‹ SYNOPSIS πŸ¦‹

void damos_sysfs_populate_region_dir (struct damon_sysfs_schemes
*sysfs_schemes , struct damon_ctx *ctx , struct damon_target *t , struct
damon_region *r , struct damos *s , bool total_bytes_only , unsigned
long sz_filter_passed );

void return, seven args, absolutely no notes πŸ’€ β€” she's not giving you anything back, she just does the thing.


🌸 ARGUMENTS 🌸

the full lineup, every single one, no skipping, periodt:

  • sysfs_schemes β€” the schemes directory she's gonna populate with regions directories. this is the destination, the venue, the main character location.
  • ctx β€” the corresponding DAMON context. the big picture, the situation, the whole ecosystem.
  • t β€” the DAMON target that r belongs to. like, r's home base.
  • r β€” the DAMON region we're actually populating the directory for. the guest of honor, lowkey.
  • s β€” the corresponding scheme. the reason we're all here tbh.
  • total_bytes_only β€” a bool telling you whether this request is for bytes update only. like, is this just a quick numbers refresh or the full treatment? iykyk.
  • sz_filter_passed β€” an unsigned long, and it's the bytes of r that passed the filters of s. literally the filtered survivor count. she's discerning ✨

πŸ”₯ DESCRIPTION πŸ”₯

so this gets called from the DAMOS walk callback β€” and here's the part you cannot miss, bestie β€” while holding damon_sysfs_lock. like, that lock is held the entire time, no exceptions, that's the whole situation. πŸ™ˆ

read it again if you need to. called from the DAMOS walk callback, holding damon_sysfs_lock. that's the vibe check and she passed.


🫢 SEE ALSO 🫢

  • the kernel file ./mm/damon/sysfs-schemes.c β€” go read the source, that's where all the lore lives πŸ‘‘

and that's the page!! πŸ’– ngl she's short but she's thorough β€” seven arguments, one lock, zero nonsense. this was the Kernel API Manual, brought to you from ./mm/damon, dated October 2026 🌈 signed, sealed, and slayed. mwah πŸ’…βœ¨

πŸ“¦ where this page comes from