vma_modify_policy(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’– vma_modify_policy(9) πŸ’–

okay so bestie, welcome to vma_modify_policy(9) β€” part of the Kernel API Manual, and honestly? This one's a setup function, not a doer. She prepares the vibes so you can make the change. πŸŽ€


✨ NAME ✨

vma_modify_policy β€” do all the necessary split/merge prep work so you can set the NUMA policy to @new_pol in the range @start to @end, which lives inside @vma. Like, she doesn't change the policy, she just gets the party ready. πŸ’…


πŸ¦‹ SYNOPSIS πŸ¦‹

struct vm_area_struct * vma_modify_policy (struct vma_iterator *vmi ,
struct vm_area_struct *prev , struct vm_area_struct *vma , unsigned long
start , unsigned long end , struct mempolicy *new_pol );

🌸 ARGUMENTS 🌸

  • vmi β€” a valid VMA iterator, and it's got to be positioned right at vma. no cap, position matters.
  • prev β€” the VMA that comes immediately before vma, or NULL if vma is literally the first one. main character energy, no predecessor. πŸ‘‘
  • vma β€” the VMA that contains the range start to end, the one you're updating.
  • start β€” where the range to update begins. It's allowed to be offset within vma, so like, not necessarily at the very front. 🫢
  • end β€” the exclusive end of the range to update. Also may be offset within vma. (Exclusive, bestie β€” she does not include end itself, that's the whole deal. πŸ’€)
  • new_pol β€” the NUMA policy that the start to end range is about to be set to. Future tense. Anticipation. 🌈

🧚 DESCRIPTION 🧚

IMPORTANT: the actual modification being requested here is NOT applied. Nope. Not happening in this function.

Okay so what does happen? The VMA is perhaps split and perhaps merged so that everything's set up nicely for the change β€” and then the caller is expected to go ahead and perform the actual modification themselves. It's giving "I did the prep, you do the final reveal." ✨

So don't walk away thinking the NUMA policy is already changed, because it is not, and that's the vibe check. πŸ”₯


⭐ RETURN ⭐

A VMA which contains the range start to end, all ready to have its NUMA policy changed to new_pol. She's prepped. She's poised. She's waiting on you. πŸ’–


πŸŽ€ SEE ALSO πŸŽ€

Kernel file ./mm/vma.h β€” plus her besties vma_modify_flags(9), vma_modify_name(9), and vma_modify_flags_uffd(9). iykyk πŸ¦‹


and that's the whole page!! sourced from ./mm, dated October 2026, and this absolute icon of a manpage is vma_modify_policy(9). slay, go split some VMAs responsibly πŸ’œπŸŒΈ

πŸ“¦ where this page comes from