STRUCT IO_TLB_POOL(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’– struct io_tlb_pool(9) πŸ’–

okay bestie, buckle up β€” this is a page from the Kernel API Manual about struct io_tlb_pool, which is genuinely one of those "sounds scary, is actually just a fancy address book" situations. ngl the name is giving intimidating but we're gonna get through it together 🫢


✨ NAME ✨

struct io_tlb_pool β€” the descriptor for an IO TLB memory pool πŸ’…

Like, it's the little ID card that a swiotlb memory pool carries around so the kernel knows who it is. That's the vibe.


🌸 SYNOPSIS 🌸

struct io_tlb_pool {
    phys_addr_t start;
    phys_addr_t end;
    void *vaddr;
    unsigned long nslabs;
    bool late_alloc;
    unsigned int nareas;
    unsigned int area_nslabs;
    struct io_tlb_area *areas;
    struct io_tlb_slot *slots;
  #ifdef CONFIG_SWIOTLB_DYNAMIC;
    struct list_head node;
    struct rcu_work dyn_free;
    bool transient;
    bool cc_shared;
  #endif;
 };

like look at her. so structured. so organized. main character energy fr fr πŸ‘‘

heads up bestie β€” those last four fields only show up when CONFIG_SWIOTLB_DYNAMIC is defined. so it's a conditional slay πŸ’€

πŸŽ€ Members πŸŽ€

  • start β€” the start address of the swiotlb memory pool. it's used to do a quick range check, aka "wait, did this API actually allocate this memory or not?" a little vibe check for addresses ✨
  • end β€” the end address of the swiotlb memory pool. same deal as start: quick range check to see if the memory was in fact allocated by this API. they're a matching set, iykyk πŸ¦‹
  • vaddr β€” the virtual address of the swiotlb memory pool. here's the tea: the pool may get remapped in the memory encrypted case, and it stores this virtual address for bounce buffer operation. so she's flexible πŸ’…
  • nslabs β€” the number of IO TLB slots between start and end. for the default swiotlb, this can be adjusted with a boot parameter β€” see setup_io_tlb_npages. lowkey customizable 😌
  • late_alloc β€” true if it was allocated using the page allocator. that's the whole description, she's short and sweet πŸ“
  • nareas β€” number of areas in the pool.
  • area_nslabs β€” number of slots in each area.
  • areas β€” array of memory area descriptors. plural. a whole squad 🌈
  • slots β€” array of slot descriptors. also a squad, different squad πŸ’œ
  • node β€” member of the IO TLB memory pool list. she's on the list, literally 😭
  • dyn_free β€” an RCU work item used to free the pool from process context. the cleanup crew 🧹
  • transient β€” true if transient memory pool. yes she's temporary, no she's not less iconic πŸ’€
  • cc_shared β€” true if the pool memory is shared for confidential computing. secretive but make it secure πŸ”₯

πŸ¦‹ SEE ALSO πŸ¦‹


okay go read those too, they're literally the friends of this struct and honestly the whole group chat is worth a look πŸ‘‘

sign-off time: this masterpiece lives in ./include/linux, dated October 2026, and she answers to the name struct io_tlb_pool(9). periodt. πŸ’–βœ¨πŸŽ€

πŸ“¦ where this page comes from