STRUCT IO_TLB_MEM(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

✨ 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 β€” the dentry to debugfs. that's it, that's the member ✨
  • force_bounce β€” true if swiotlb bouncing is forced πŸ”₯
  • for_alloc β€” true if the pool is used for memory allocation
  • cc_shared β€” true if the pool memory is shared for confidential computing πŸ‘‘
  • can_grow β€” true if 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 calculating used_hiwater via boot parameter swiotlb=track_hiwater and exposed via debugfs πŸ‘€
  • used_hiwater β€” the high water mark for total_used. can be enabled at boot time via swiotlb=track_hiwater and 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 at total_used or used_hiwater outside of the swiotlb=track_hiwater boot 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 🌈

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