dmem_cgroup_...ict_valuable(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… dmem_cgroup_state_evict_valuable β€” Kernel API Manual, bestie edition πŸŽ€

okay so this is a page from the Kernel API Manual (yes, the actual kernel, we're literally in ./kernel/cgroup/dmem.c territory, main character energy) and it's about the very serious business of deciding whether to evict stuff from a pool. grab a strawberry drink πŸ“ and let's go.


✨ NAME ✨

dmem_cgroup_state_evict_valuable β€” the vibes check that tells you whether we should evict from test_pool. fr fr that's the whole job.


🌸 SYNOPSIS 🌸

bool dmem_cgroup_state_evict_valuable (struct dmem_cgroup_pool_state
*limit_pool , struct dmem_cgroup_pool_state *test_pool , bool ignore_low
, bool *ret_hit_low );

like, it takes four things and gives you back a bool. no cap.


πŸ¦‹ ARGUMENTS πŸ¦‹

  • limit_pool β€” the pool where we actually hit the limits πŸ‘‘ this is the one that's causing the whole situation.
  • test_pool β€” the pool we're testing, i.e. the candidate we're lowkey side-eyeing to see if it's evictable.
  • ignore_low β€” whether we have to respect low watermarks. yes, this is a real thing we care about πŸ™ˆ
  • ret_hit_low β€” a pointer to a bool that says whether it even makes sense to consider the low watermark. it's giving "output parameter, but make it cute."

πŸ’– DESCRIPTION πŸ’–

So here's the tea β˜• β€” this function returns true if we can evict from test_pool, and false if we can't. simple as that, periodt.

But wait, there's a plot twist 😭 β€” when it returns false and ignore_low is false, ret_hit_low may be set to true. and what does that mean? it means you can literally retry this function with ignore_low set to true. it's giving "second chance, bestie" ✨. note the "may" β€” that's the function being coy, not me making stuff up.


⭐ RETURN ⭐

bool

that's it. that's the return. iconic. πŸ‘‘


🌈 SEE ALSO 🌈

the source of truth lives in the kernel file ./kernel/cgroup/dmem.c β€” go read it, it's right there, iykyk πŸ’œ

like a whole friend group of functions, honestly 🫢


🫢 cute little sign-off: this page lives under ./kernel/cgroup, dated October 2026, and its manual name is dmem_cgroup_...ict_valuable(9). mwah πŸ’‹ go evict responsibly, bestie πŸ’…βœ¨
πŸ“¦ where this page comes from