Thread (24 messages) 24 messages, 7 authors, 2022-01-07

Re: [PATCH v3 5/5] mm/slub: do not create dma-kmalloc if no managed pages in DMA zone

From: Christoph Hellwig <hch@lst.de>
Date: 2021-12-23 08:52:46
Also in: kexec, linux-mm, lkml

On Wed, Dec 22, 2021 at 12:37:03PM +0000, Hyeonggon Yoo wrote:
Oh I misunderstood this. Underlying physical address of vmalloc()-allocated memory
can be mapped using DMA API, and it needs to be setup as scatterlist because
the allocated memory is not physically continuous. Right?
Yes.
BTW, looking at the API I think the scsi case can be converted to use
dma_alloc_pages(). but driver requires 512 bytes of buffer and the API
supports allocating by at least page size.
Overallocating is not generally a problem, but if the allocations are for
a slow path it might make more sense to stick to dma_map_* and bounce
buffer if needed.
It's not a big problem as it allocates a single buffer but in other
cases maybe not. Can't we use dma pool for non-coherent pages?
No.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help