STRUCT IO_TLB_MEM(9)
β¨ struct io_tlb_mem(9) β¨
okay so bestie, welcome to the Kernel API Manual π β today's main character is struct io_tlb_mem, which is literally the Software IO TLB allocator. yes it's a struct, yes it's iconic, yes you're gonna understand it. periodt π«Ά
πΈ NAME πΈ
struct io_tlb_mem β the Software IO TLB allocator, no cap π
π¦ SYNOPSIS π¦
struct io_tlb_mem {
struct io_tlb_pool defpool;
unsigned long nslabs;
struct dentry *debugfs;
bool force_bounce;
bool for_alloc;
bool cc_shared;
#ifdef CONFIG_SWIOTLB_DYNAMIC;
bool can_grow;
u64 phys_limit;
spinlock_t lock;
struct list_head pools;
struct work_struct dyn_alloc;
#endif;
#ifdef CONFIG_DEBUG_FS;
atomic_long_t total_used;
atomic_long_t used_hiwater;
atomic_long_t transient_nslabs;
#endif;
};
like, look at her. she's got conditional compilation AND vibes β¨
π Members π
okay so here's the breakdown, member by member, and I need you to stay with me because every single one matters π
defpoolβ the default (initial) IO TLB memory pool descriptor. the og pool, the blueprint, the moment π«Άnslabsβ total number of IO TLB slabs in all pools. yes, all of them, she's counting everything πdebugfsβ thedentryto debugfs. that's it, that's the member β¨force_bounceβtrueif swiotlb bouncing is forced π₯for_allocβtrueif the pool is used for memory allocationcc_sharedβtrueif the pool memory is shared for confidential computing πcan_growβtrueif more pools can be allocated dynamically π±phys_limitβ maximum allowed physical address. the ceiling, the limit, the boundary bestie π§lockβ lock to synchronize changes to the list. no racing, no chaos, we're civilized here πpoolsβ list of IO TLB memory pool descriptors (if dynamic)dyn_allocβ dynamic IO TLB pool allocation work. she's working, she's busy, respect it πtotal_usedβ the total number of slots in the pool that are currently used across all areas. used only for calculatingused_hiwatervia boot parameterswiotlb=track_hiwaterand exposed via debugfs πused_hiwaterβ the high water mark fortotal_used. can be enabled at boot time viaswiotlb=track_hiwaterand exposed via debugfs πtransient_nslabsβ the total number of slots in all transient pools that are currently used across all areas. short-lived but still counting herself π
ngl, if you're poking attotal_usedorused_hiwateroutside of theswiotlb=track_hiwaterboot parameter / debugfs situation, that's not the vibe the struct intended π they're literally described as used only for that and exposed via debugfs.
π SEE ALSO π
- Kernel file
./include/linux/swiotlb.hstruct io_tlb_pool(9),swiotlb_find_pool(9)π¦
go read those next, iykyk β
and that's the whole page bestie!! π this one lives in ./include/linux and the version/date on the tin is October 2026 β so like, future-dated documentation, main character energy fr fr π§π mwah, go read your kernel headers π
β¨
π¦ 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