VM_PAGE_DONTNEED(9)
π VM_PAGE_DONTNEED π
ok so bestie, welcome to the Kernel Developer's Manual β this is the vm_page_dontneed page and it's literally a lil two-function situation, we love a short king. sit down, hydrate, let's go π«Ά
β¨ NAME β¨
vm_page_dontneed β the way to say "yeah this page? not needed anymore, bye π
"
π SYNOPSIS π
#include <sys/param.h>
#include <vm/vm.h>
#include <vm/vm_page.h>
void
vm_page_dontneed(vm_page_t m);
no cap, that's the whole thing. one function, one argument, returns nothing. icon behaviour πΈ
π¦ DESCRIPTION π¦
ok so here's the vibe. vm_page_dontneed() is basically you tapping the VM system on the shoulder like "hey girlypop, this page right here? we don't need it anymore bestie" π
and the VM system goes:
- if the page is already chillin' in the inactive queue or the cache queue? it does absolutely nothing. not a single thing. it's giving "already handled, thanks for coming" π
- otherwise? the page gets deactivated. slay.
β οΈ but wait β plot twist β vm_page_dontneed() does not necessarily deactivate a page. it's not that simple, bestie. it actually implements an algorithm, and the algorithm is doing two things at once: 1. trying to stop small objects from having their pages reused way too fast (rude of them honestly) 2. trying to stop large objects from flushing the smaller ones out of the queues when their pages get released π so it's less "do this one thing" and more "make a strategic little choice about the queues". main character energy fr fr.
π SEE ALSO π
vm_page_deactivate(9)β the sister page, go read her too π
π§ AUTHORS π§
this manual page was written by Chad David <davidc@acns.ab.ca> β thank you king, we appreciate the lore π«Ά
and that's the whole page babes π this one shipped with Debian, dated July 30, 2001, and it lives under the name VM_PAGE_DONTNEED(9). yes she's a 2001 baby and yes she still ate. periodt. πβ
π¦ where this page comes from
- debian bookworm: freebsd-manpages 12.2-1 Β· BSD-2-Clause-FreeBSD AND BSD-4-Clause
- debian trixie: freebsd-manpages 12.2-2 Β· BSD-2-Clause-FreeBSD AND BSD-4-Clause
- ubuntu jammy: freebsd-manpages 12.2-1 Β· BSD-2-Clause-FreeBSD AND BSD-4-Clause
- ubuntu noble: freebsd-manpages 12.2-1 Β· BSD-2-Clause-FreeBSD AND BSD-4-Clause
- ubuntu questing: freebsd-manpages 12.2-2
- ubuntu resolute: freebsd-manpages 12.2-2build1 Β· BSD-2-Clause-FreeBSD AND BSD-4-Clause
- ubuntu stonking: freebsd-manpages 12.2-2build1 Β· BSD-2-Clause-FreeBSD AND BSD-4-Clause
- Copyright (C) 2001 Chad David <davidc@acns.ab.ca>. All rights reserved
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms