Re: [PATCH v1 07/15] io_uring: Allocate zctap device buffers and dma map them.

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

 



On 16 Nov 2022, at 0:15, Christoph Hellwig wrote:

>> +		dma_unmap_page_attrs(device, buf->dma, PAGE_SIZE,
>> +				     DMA_BIDIRECTIONAL,
>> +				     DMA_ATTR_SKIP_CPU_SYNC);
>
>> +		addr = dma_map_page_attrs(device, page, 0, PAGE_SIZE,
>> +					  DMA_BIDIRECTIONAL,
>> +					  DMA_ATTR_SKIP_CPU_SYNC);
>
> You can't just magically skip cpu syncs.  The flag is only valid
> for mappings of already mapped memory when following a very careful
> protocol.  I can't see any indications of that beeing true here,
> but maybe I'm just missing something.

This was copied from page_pool_dma_map().  The same logic applies -
io_uring pins the memory, zctap creates a pool that is dma mapped, and
the driver performs dma_sync_single_*() when receiving the packet.
—
Jonathan



[Index of Archives]     [Linux Samsung SoC]     [Linux Rockchip SoC]     [Linux Actions SoC]     [Linux for Synopsys ARC Processors]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]


  Powered by Linux