pseudo_lock_region_alloc(9)
π 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 π₯
0on success π (we love a zero)<0on 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:
pseudo_lock_minor_get(9)pseudo_lock_minor_release(9)region_find_by_minor(9)struct pseudo_lock_pm_req(9)pseudo_lock_cstates_constrain(9)pseudo_lock_region_clear(9)pseudo_lock_region_init(9)pseudo_lock_init(9)pseudo_lock_free(9)rdtgroup_monitor_in_progress(9)rdtgroup_locksetup_user_restrict(9)rdtgroup_locksetup_user_restore(9)rdtgroup_locksetup_enter(9)rdtgroup_locksetup_exit(9)rdtgroup_cbm_overlaps_pseudo_locked(9)rdtgroup_pseudo_locked_in_hierarchy(9)pseudo_lock_measure_cycles(9)rdtgroup_pseudo_lock_create(9)rdtgroup_pseudo_lock_remove(9)
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/resctrland it's dated October 2026, and the manual page itself ispseudo_lock_region_alloc(9).
k byeeee, go pseudo-lock something π β¨π π¦ πΈ π
π¦ where this page comes from
- nixpkgs unstable: linux-manual 7.3.1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms