vmpressure(9)
π 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, thatgfp. iconic.orderβ the allocation order that's being reclaimed for π«Άmemcgβ the cgroup memory controller handle πtreeβ legacy subtree mode. she's abool, 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 π₯
- Kernel file
./mm/vmpressure.c vmpressure_init(9)vmpressure_cleanup(9)
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
- 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