Just to add a highlevel comment here after I feel like I need a little more time to review the guts. I'm still pretty concerned about the extra list that needs to be consulted in is_swiotlb_buffer, but I can't really think of anything better. Maybe an xarray has better cache characteristics, but that one requires even more allocations in the low-level dma map path. One thing I'd like to see for the next version is to make the new growing code a config option at least for now. It is a pretty big change of the existing swiotlb behavior, and I want people to opt into it conciously. Maybe we can drop the option again after a few years once everything has settled.