Re: [PATCH v7 3/6] mm/gup: Introduce memfd_pin_folios() for pinning memfd folios (v7)

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, Dec 13, 2023 at 08:31:55AM -0400, Jason Gunthorpe wrote:
> > That is, populate a scatterlist with ubuf->pagecount number of entries,
> > where each segment if of size PAGE_SIZE, in order to be consistent and
> > support a wide variety of DMA importers that may not probably handle
> > segments that are larger than PAGE_SIZE.
> 
> No! This is totally wrong, sg lists must aggregate up to the limits
> specified in the struct device. We have importer helpers that do this
> aggregation.
> 
> If some driver is working with a sglist and can't handle this it is
> simply broken. Do not mess up core code to accomodate such things.

Well.. There's no single driver that is broken, it's more the whole
dmabuf philosophy that wants things to be mappable by multiple devices
without knowing their limits beforehand.  So you'll get this cargo
culting.




[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Bugtraq]     [Linux OMAP]     [Linux MIPS]     [eCos]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux