VNODE_PAGER_PURGE_RANGE(9)
π VNODE_PAGER_PURGE_RANGE(9) π
okay bestie, this one is from the Kernel Developerβs Manual, and itβs all about telling the vnode pager to β¨purgeβ¨ a byte range. no cap, itβs niche but iconic.
πΈ NAME πΈ
vnode_pager_purge_range β invalidate the cached content within the given byte range
β¨ SYNOPSIS β¨
#include <sys/param.h>
#include <vm/vm.h>
#include <vm/vm_extern.h>
void
vnode_pager_purge_range(struct vnode *vp, vm_ooffset_t start,
vm_ooffset_t end);
π¦ DESCRIPTION π¦
so vnode_pager_purge_range invalidates the cached content inside the given byte range from the specified vnode vp. the range getting purged is [start, end), periodt.
if the end parameter is the value zero, then the affected range starts from start and continues all the way to the end of the object. yes bestie, zero means βto the endβ here, iykyk.
pages within the specified range will be removed from the objectβs queue. if start or end is not aligned to a page boundary, the invalidated part of the page is zeroed. π
this function only cleans the resident pages in the affected region β it is up to the callers to ensure reading the backing store gets back zeroes. so like, donβt expect this function to handle the whole zero situation for you, fr fr.
in case the vnode vp does not have a VM object allocated, the effect of calling this function is a no-op. literally nothing happens. π«Ά
π LOCKS π
the vnode must be locked on entry and will still be locked on exit. so it goes in locked and comes out locked β main character energy, no drama. π
π SEE ALSO π
π HISTORY π
the vnode_pager_purge_range manual page first appeared in FreeBSD 14. slay. π
π AUTHORS π
this manual page was written by Ka Ho Ng <khng@FreeBSD.org>. give them their flowers bestie. πΈ
Debian Β· April 24, 2022 β thatβs the source/version and date, and this page is officially signed off with group-chat love. mwah πβ¨
π¦ where this page comes from
- freebsd 14.5: base 14.5
- freebsd 15.1: base 15.1
- nixpkgs unstable: source
- π the page's license: BSD-2-Clause
- Copyright (c) 2021 The FreeBSD Foundation
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms