UVM_OBJ_WIREPAGES(9)

πŸ“¦ version 11.0, in nixpkgs unstable

πŸ’– UVM_OBJ_WIREPAGES(9) πŸ’–

okay bestie, welcome to the Kernel Developer's Manual β€” this one is about temporarily wiring pages of a UVM object into RAM, and it's honestly a little iconic. πŸ’…


🌸 NAME 🌸

uvm_obj_wirepages, uvm_obj_unwirepages β€” temporarily wire pages of a UVM object into RAM ✨

πŸŽ€ SYNOPSIS πŸŽ€

#include <uvm/uvm_extern.h>

int
uvm_obj_wirepages(struct uvm_object *uobj, off_t start, off_t end,
    struct pglist *list);

void
uvm_obj_unwirepages(struct uvm_object *uobj, off_t start, off_t end);

πŸ¦‹ DESCRIPTION πŸ¦‹

uvm_obj_wirepages() temporarily wires a range of pages in a UVM object into RAM. If any pages from start (inclusive) to end (exclusive) are currently paged out, it pages them back in first, and arranges that the pages in the range will not be paged out until unwired with uvm_obj_unwirepages().

If list is nonnull, it is initialized to a tailq of pages linked through the pageq.queue member of struct vm_page, for the convenience of the caller. Ownership of any part of list is not transferred to the caller, and you don't need to free anything afterward β€” uvm_obj_unwirepages() will free the pages when done. 🫢

bestie, start and end must be page-aligned. no cap. πŸ“

Calls to uvm_obj_wirepages() must be matched by uvm_obj_unwirepages() with the same range.

Overlapping ranges may be simultaneously wired; each page may be wired up to 2^32 - 1 times, and will not be paged out until all ranges covering it have been unwired. πŸ”₯

🌈 RETURN VALUES 🌈

The uvm_obj_wirepages() function returns zero on success, or returns an errno(3) error code and leaves the wired status of all pages unchanged on failure.

πŸ’œ SEE ALSO πŸ’œ


πŸ’Œ source/version: Debian Β· date: June 14, 2024 Β· bye bestie, go wire those pages responsibly 🧚

πŸ“¦ where this page comes from