swiotlb_find_slots(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… swiotlb_find_slots(9) β€” like, the whole swiotlb search era ✨

okay so bestie, this is swiotlb_find_slots from the Kernel API Manual and it is literally the function that hunts down slots in the whole software IO TLB. no cap. it's giving "search the entire pool, find a matching sequence, slay." πŸ’–


πŸ¦‹ SYNOPSIS

int swiotlb_find_slots (struct device *dev , phys_addr_t orig_addr ,
size_t alloc_size , unsigned int alloc_align_mask , struct io_tlb_pool
**retpool );

πŸŽ€ ARGUMENTS

  • dev β€” the device that's mapping the buffer. main character energy, honestly.
  • orig_addr β€” the original (non-bounced) IO buffer address. the real address before any bouncing shenanigans.
  • alloc_size β€” total requested size of the bounce buffer, including initial alignment padding. yes bestie, padding counts. 🫢
  • alloc_align_mask β€” the required alignment of the allocated buffer. gotta line up perfectly, periodt.
  • retpool β€” the used memory pool, and it gets updated on return. so it's not just coming back empty-handed. πŸ”₯

🌸 DESCRIPTION

search through the entire software IO TLB to find a sequence of slots that match the allocation constraints. that's it, that's the vibe. lowkey iconic. πŸ’…

like, the whole swiotlb. not a snippet, not a corner β€” the whole thing. iykyk.

⭐ RETURN

index of the first allocated slot, or -1 on error. simple, clean, ate. πŸ‘‘


🌈 SEE ALSO

no gatekeeping here bestie, here's the whole friend group: kernel file ./kernel/dma/swiotlb.c, struct io_tlb_slot(9), struct io_tlb_area(9), swiotlb_adjust_nareas(9), limit_nareas(9), add_mem_pool(9), alloc_dma_pages(9), swiotlb_alloc_tlb(9), swiotlb_free_tlb(9), swiotlb_alloc_pool(9), swiotlb_dyn_alloc(9), __swiotlb_find_pool(9), swiotlb_del_pool(9), swiotlb_dev_init(9), swiotlb_align_offset(9), swiotlb_search_pool_area(9), swiotlb_search_area(9), mem_pool_used(9), mem_used(9), swiotlb_tbl_map_single(9), swiotlb_del_transient(9), is_swiotlb_allocated(9), default_swiotlb_base(9), default_swiotlb_limit(9).


and that's the whole page, bestie. 🧚 source lives at ./kernel/dma, dated October 2026, and the manual name is swiotlb_find_slots(9) β€” so you know it's official. mwah. πŸ’œβœ¨

πŸ“¦ where this page comes from