mpol_shared_policy_init(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… mpol_shared_policy_init β€” like, the shared policy glow-up for your inode ✨

okay bestie, welcome to the Kernel API Manual entry for mpol_shared_policy_init(9) β€” yes that whole manual, we're doing this πŸŽ€


🌸 NAME 🌸

mpol_shared_policy_init β€” initialize shared policy for inode. that's it, that's the whole vibe check πŸ’–


✨ SYNOPSIS ✨

void mpol_shared_policy_init (struct shared_policy *sp , struct mempolicy *mpol );

🫢 ARGUMENTS 🫢

  • sp β€” pointer to inode shared policy. it's giving "where the magic happens" ✨
  • mpol β€” the struct mempolicy to install. this is the main character fr πŸ‘‘

πŸ’€ DESCRIPTION πŸ’€

okay so here's the tea πŸ“: you install a non-NULL mpol in the inode's shared policy rb-tree. literally just slot it in there, no cap.

ngl, there's a little caveat you cannot skip β€” on entry, the current task has a reference on a non-NULL mpol, and this must be released on exit. πŸ™ˆ like, do not forget, bestie, that's a leak waiting to happen.

the way this works: it's called at get_inode calls, and because of that we can use GFP_KERNEL. slay, convenient allocation context, we love to see it πŸ’…


πŸ”₯ SEE ALSO πŸ”₯

like, the whole friend group, honestly πŸ¦‹


mwah πŸ’‹ that's the page β€” sourced from ./mm, dated October 2026, and yes this manual is Kernel API Manual energy through and through. go forth and initialize those shared policies, icon πŸ’œ

πŸ“¦ where this page comes from