On Fri, 2026-02-13 at 12:00 -0800, Matthew Brost wrote: > On Fri, Feb 13, 2026 at 10:56:46AM -0400, Jason Gunthorpe wrote: > > On Wed, Feb 11, 2026 at 10:51:32AM -0800, Matthew Brost wrote: > > > > So to be a little nicer on the IOVA allocator we could use the > > > > below? > > > > > > > > dma_iova_try_alloc(dev, &state->dma_state, > > > > (npages - i) * > > > > PAGE_SIZE >= > > > > HPAGE_PMD_SIZE ? > > > > HPAGE_PMD_SIZE : 0, > > > > (npages - i) * > > > > PAGE_SIZE); > > > > > > > > > > Yes, we can do that. No reason to force alignment if our copy > > > code isn't > > > going to try to use 2M GPU pages. > > > > When it comes to this I prefer we try to add alignment information > > down to the iova allocator because I have other use cases for this > > alignment optimization. > > Trying to parse this - what exactly is your preference here in the > context of this patch? > > i.e., Is original code ok, is Thomas's suggestion ok, or should we do > something entirely different? > > Matt
Interpreting this as Jason would want an alignment parameter to the IOVA alloctor. Although that's already the case, albeit somewhat awkwardly named. Thanks, Thomas > > > > > Jason
