RE: [PATCH v4 0/4] Implement dmabuf direct I/O via copy_file_range

2025-06-13 Thread wangtao
> On Tue, Jun 10, 2025 at 12:52:18PM +0200, Christian König wrote: > > >> dma_addr_t/len array now that the new DMA API supporting that has > > >> been merged. Is there any chance the dma-buf maintainers could > > >> start to kick this off? I'm of course happy to assist. > > > > Work on that i

RE: [PATCH v4 0/4] Implement dmabuf direct I/O via copy_file_range

2025-06-13 Thread wangtao
> > On Mon, Jun 09, 2025 at 09:32:20AM +, wangtao wrote: > > Are you suggesting adding an ITER_DMABUF type to iov_iter, > > Yes. May I clarify: Do all disk operations require data to pass through memory (reading into memory or writing from memory)? In the block layer, the bio structure uses

Re: [PATCH v4 0/4] Implement dmabuf direct I/O via copy_file_range

2025-06-10 Thread Christian König
; linux-me...@vger.kernel.org; dri- >> de...@lists.freedesktop.org; linaro-mm-...@lists.linaro.org; linux- >> ker...@vger.kernel.org; linux-fsde...@vger.kernel.org; linux- >> m...@kvack.org; wangbintian(BintianWang) ; >> yipengxiang ; liulu 00013167 >> ; hanfeng 00012985

RE: [PATCH v4 0/4] Implement dmabuf direct I/O via copy_file_range

2025-06-09 Thread wangtao
inaro-mm-...@lists.linaro.org; linux- > ker...@vger.kernel.org; linux-fsde...@vger.kernel.org; linux- > m...@kvack.org; wangbintian(BintianWang) ; > yipengxiang ; liulu 00013167 > ; hanfeng 00012985 > Subject: Re: [PATCH v4 0/4] Implement dmabuf direct I/O via > copy_file_range &g

Re: [PATCH v4 0/4] Implement dmabuf direct I/O via copy_file_range

2025-06-06 Thread Christian König
; baolin.w...@linux.alibaba.com; linux-me...@vger.kernel.org; dri- >> de...@lists.freedesktop.org; linaro-mm-...@lists.linaro.org; linux- >> ker...@vger.kernel.org; linux-fsde...@vger.kernel.org; linux- >> m...@kvack.org; wangbintian(BintianWang) ; >> yipengxiang ; liulu 00013167 >>

RE: [PATCH v4 0/4] Implement dmabuf direct I/O via copy_file_range

2025-06-06 Thread wangtao
inaro-mm-...@lists.linaro.org; linux- > ker...@vger.kernel.org; linux-fsde...@vger.kernel.org; linux- > m...@kvack.org; wangbintian(BintianWang) ; > yipengxiang ; liulu 00013167 > ; hanfeng 00012985 > Subject: Re: [PATCH v4 0/4] Implement dmabuf direct I/O via > copy_file_range &g

RE: [PATCH v4 0/4] Implement dmabuf direct I/O via copy_file_range

2025-06-06 Thread wangtao
inaro-mm-...@lists.linaro.org; linux- > ker...@vger.kernel.org; linux-fsde...@vger.kernel.org; linux- > m...@kvack.org; wangbintian(BintianWang) ; > yipengxiang ; liulu 00013167 > ; hanfeng 00012985 > Subject: Re: [PATCH v4 0/4] Implement dmabuf direct I/O via > copy_file_range &g

Re: [PATCH v4 0/4] Implement dmabuf direct I/O via copy_file_range

2025-06-03 Thread Christian König
On 6/3/25 16:28, Christoph Hellwig wrote: > On Tue, Jun 03, 2025 at 04:18:22PM +0200, Christian König wrote: >>> Does it matter compared to the I/O in this case? >> >> It unfortunately does, see the numbers on patch 3 and 4. > > That's kinda weird. Why does the page table lookup tage so much > ti

Re: [PATCH v4 0/4] Implement dmabuf direct I/O via copy_file_range

2025-06-03 Thread Christian König
On 6/3/25 15:19, Christoph Hellwig wrote: > On Tue, Jun 03, 2025 at 03:14:20PM +0200, Christian König wrote: >> On 6/3/25 15:00, Christoph Hellwig wrote: >>> This is a really weird interface. No one has yet to explain why dmabuf >>> is so special that we can't support direct I/O to it when we can

Re: [PATCH v4 0/4] Implement dmabuf direct I/O via copy_file_range

2025-06-03 Thread Christian König
On 6/3/25 15:00, Christoph Hellwig wrote: > This is a really weird interface. No one has yet to explain why dmabuf > is so special that we can't support direct I/O to it when we can support > it to otherwise exotic mappings like PCI P2P ones. With udmabuf you can do direct I/O, it's just ineffici

[PATCH v4 0/4] Implement dmabuf direct I/O via copy_file_range

2025-06-03 Thread wangtao
Main steps to load file data into dmabuf: 1. dmabuf_fd = dmabuf_alloc(len, heap_fd) 2. vaddr = mmap(NULL, len, PROT_READ | PROT_WRITE, MAP_SHARED, dmabuf_fd, 0) 3. file_fd = open(file_path, O_RDONLY) 4. read(file_fd, vaddr, len) dmabuf's attachment/map/fence model sets VM_PFNMAP for mmap, which la