Re: [PATCH v2 0/2] mm: Allow kmalloc() allocations below ARCH_KMALLOC_MINALIGN

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

 



On Tue, Oct 25, 2022 at 09:52:45PM +0100, Catalin Marinas wrote:
> To me, the ideal approach would be __dma annotations on pointers aimed
> at DMA and using kernel tools like sparse to identify them.

As a reviewer of drivers, and a subsystem maintainer, yes, I too would
like this instead.  It would make it much more obvious what is
happening.

> dma_kmalloc() would return such pointers. However, things get muddier
> with scatterlists since functions like sg_set_page() don't have any such
> pointer information (can we mark the offset as __dma instead?).

Drivers don't always call dma_kmalloc() for pointers to pass to dma
controllers.  Heck, I doubt the majority do that at all today, that's
the main problem overall that you are having.

We can take the time and move the kernel to do this, perhaps that is the
real solution that will work best over time here?

thanks,

greg k-h




[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