pseudo_lock_region_alloc(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… pseudo_lock_region_alloc(9) πŸ’…

okay so bestie, buckle up β€” you're reading a page from the Kernel API Manual, and yes it's the pseudo_lock_region_alloc one. This is the function that goes "here, have some memory, and also we're gonna lock it to the cache, no big deal." Very main character energy honestly.


✨ NAME ✨

pseudo_lock_region_alloc β€” allocate kernel memory that will be pseudo-locked 🫢

Like... it grabs memory, and that memory is destined for pseudo-lock greatness. It's giving "you're not like other allocations."


πŸŽ€ SYNOPSIS πŸŽ€

int pseudo_lock_region_alloc (struct pseudo_lock_region *plr );

yep that's it, that's the whole signature. takes one pointer, returns an int. short and iconic, we love a low-effort-but-effective king πŸ‘‘


🌸 ARGUMENTS 🌸

  • plr β€” pseudo-lock region. literally just the region struct you're working with, she's the star of the show, please have her ready πŸ’–

πŸ¦‹ DESCRIPTION πŸ¦‹

so what does this do?? okay so basically it initializes the details required to set up the pseudo-locked region β€” like, all the little bookkeeping bits that need to be in place first β€” and then it allocates the contiguous memory that will be pseudo-locked to the cache.

contiguous memory. in the cache. locked. not me getting emotional over memory layout 😭 it's literally the whole setup phase, the "getting ready" montage before the main event. slay.


πŸ”₯ RETURN πŸ”₯

  • 0 on success πŸ’– (we love a zero)
  • <0 on failure πŸ’€

and if it does fail, a descriptive error will be written to the last_cmd_status buffer β€” so like, you won't be left guessing, she tells you what went wrong. very communicative, very healthy. iykyk.


⭐ SEE ALSO ⭐

go read these next, bestie, they're all in Kernel file ./fs/resctrl/pseudo_lock.c and they're all part of the same little friendship group:

like, that's a whole squad. click through them, it's a rabbit hole and honestly it's a good one 🌈


quick reminder: this whole page lives under ./fs/resctrl and it's dated October 2026, and the manual page itself is pseudo_lock_region_alloc(9).

k byeeee, go pseudo-lock something πŸ’…βœ¨πŸŽ€ πŸ¦‹ 🌸 πŸ’œ

πŸ“¦ where this page comes from