nd_region_acquire_lane(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

✨ nd_region_acquire_lane β€” the kernel API manual, bestie edition ✨

okay so we're in the Kernel API Manual today and the star of the show is nd_region_acquire_lane(9) β€” literally the function that hands you a lane and locks it down. let's get into it πŸŽ€


🌸 NAME 🌸

nd_region_acquire_lane β€” allocate and lock a lane, that's it, that's the whole vibe πŸ’…


πŸ¦‹ SYNOPSIS πŸ¦‹

unsigned int nd_region_acquire_lane (struct nd_region *nd_region );

copy it exactly like that, no cap, the spacing is part of the aesthetic (jk but also don't touch it) πŸ™ˆ


πŸ“ ARGUMENTS πŸ“

  • nd_region β€” the region id and the number of lanes possible. like it's doing two jobs at once and honestly? main character energy πŸ‘‘

πŸ’œ DESCRIPTION πŸ’œ

so a lane correlates to a log slot in the BTT. that's the whole concept, bestie. 🫢

lanes are shared across CPUs using a static lane = cpu % num_lanes mapping, with a per-lane mutex to serialize access. so the CPUs are all up in the same lane rotation and the mutex keeps them from stepping on each other's toes β€” it's giving polite chaos 🌈

⚠️ real talk: callers must be in sleepable context. not optional, not negotiable. do not come in here with your atomic nonsense, the mutex will simply not have it 😭

the only in-tree caller is BTT's ->submit_bio handler (btt_read_pg / btt_write_pg). just those two. iconic of them to be the only ones invited to the party fr fr ✨


πŸ”₯ SEE ALSO πŸ”₯

go read those too, iykyk πŸ’–


and that's the page!! 🌟 this lil beauty comes to you from ./drivers/nvdimm, dated October 2026, living in the Kernel API Manual β€” mwah, stan the nvdimm region code for clear skin πŸ§šπŸ’œ

πŸ“¦ where this page comes from