vmpressure(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… vmpressure β€” the Kernel API Manual page, bestie edition πŸŽ€

okay so picture this: it's vmpressure(9), straight out of the Kernel API Manual, and she's here to tell you all about memory pressure. let's get into it ✨


🌸 NAME 🌸

vmpressure β€” literally the function that accounts memory pressure through the scanned/reclaimed ratio. that's the whole vibe. no cap.


πŸ¦‹ SYNOPSIS πŸ¦‹

void vmpressure (gfp_t gfp , int order , struct mem_cgroup *memcg , bool
tree , unsigned long scanned , unsigned long reclaimed );

look at her. six arguments. main character energy fr fr πŸ‘‘


✨ ARGUMENTS ✨

  • gfp β€” the reclaimer's gfp mask. yes, that gfp. iconic.
  • order β€” the allocation order that's being reclaimed for 🫢
  • memcg β€” the cgroup memory controller handle πŸ’–
  • tree β€” legacy subtree mode. she's a bool, she's got history, we respect her πŸ™ˆ
  • scanned β€” how many pages got scanned πŸ”
  • reclaimed β€” how many pages got reclaimed πŸŽ€

πŸ’œ DESCRIPTION πŸ’œ

okay so the tea β˜•: you should be calling this function from the vmscan reclaim path, because its whole job is to account for "instantaneous" memory pressure β€” that's the scanned/reclaimed ratio, bestie. and then? the raw pressure index gets further refined and averaged over time. she doesn't just give you the instant read, she gives you the whole arc πŸ“ˆβœ¨

now here's where it gets interesting πŸ‘€

if tree is set, vmpressure is in traditional userspace reporting mode β€” meaning memcg is considered the pressure root, and userspace gets notified about the entire subtree's reclaim efficiency. big group-chat energy, everyone gets the message 🫢

if tree is not set, then reclaim efficiency is recorded for memcg, and only in-kernel users are notified. lowkey exclusive. iykyk πŸ’…

and bestie, this function does not return any value. it's void. she gives, she doesn't take 😌

πŸ”₯ SEE ALSO πŸ”₯


and that's the whole page, bestie 🧚 ngl she ate. this one's brought to you by ./mm, dated October 2026 β€” slay, see you in the next manpage πŸ’–πŸŒˆβ­

πŸ“¦ where this page comes from