VM_PAGE_WIRE(9)

πŸ“¦ version 15.1, in freebsd 14.5, freebsd 15.1

okay so bestie, this is VM_PAGE_WIRE(9) from the Kernel Developer's Manual, section 9, and it’s giving major β€œplease do not reclaim my page” energy βœ¨πŸ’–

🌸 NAME 🌸

vm_page_wire, vm_page_unwire, vm_page_unwire_noq β€” wire and unwire pages πŸ’…

πŸ¦‹ SYNOPSIS πŸ¦‹

#include <sys/param.h>
#include <vm/vm.h>
#include <vm/vm_page.h>

void
vm_page_wire(vm_page_t m);

bool
vm_page_wire_mapped(vm_page_t m);

void
vm_page_unwire(vm_page_t m, int queue);

bool
vm_page_unwire_noq(vm_page_t m);

✨ DESCRIPTION ✨

okay so vm_page_wire() and vm_page_wire_mapped() are the functions that wire a page. Wiring a page means it cannot be reclaimed by the page daemon, and it also cannot be reclaimed when its containing object is destroyed. Both functions require that the page belong to an object β€” that part is non-negotiable, bestie 🫢 vm_page_wire_mapped() is the one for use by the pmap(9) layer following a lookup. It may fail if mappings of the page are concurrently being destroyed, and in that case it returns false 😭

vm_page_unwire() and vm_page_unwire_noq() release a wiring of a page. vm_page_unwire() takes a queue index and will insert the page into the corresponding page queue upon releasing its last wiring. If the page does not belong to an object and no other references to the page exist, vm_page_unwire() will free the page. vm_page_unwire_noq() releases the wiring and returns true if it was the last wiring of the page. periodt πŸ’…

πŸ‘‘ AUTHORS πŸ‘‘

This manual page was written by Chad David <davidc@acns.ab.ca>. πŸ’–


πŸ’– brought to you by Debian, dated September 9, 2019 β€” bye bestie, slay your pages πŸ’…βœ¨

πŸ“¦ where this page comes from