nd_region_acquire_lane(9)
β¨ 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 π₯
- Kernel file
./drivers/nvdimm/region_devs.c nd_region_to_nstype(9)generic_nvdimm_flush(9)nvdimm_has_flush(9)
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
- 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