Re: [Linaro-mm-sig] Changing vma->vm_file in dma_buf_mmap()

2020-09-17 Thread Daniel Vetter
On Thu, Sep 17, 2020 at 6:39 PM Jason Gunthorpe wrote: > > On Thu, Sep 17, 2020 at 06:06:14PM +0200, Christian König wrote: > > > > If it is already taking a page fault I'm not sure the extra function > > > > call indirection is going to be a big deal. Having a uniform VMA > > > > sounds saner tha

Re: [Linaro-mm-sig] Changing vma->vm_file in dma_buf_mmap()

2020-09-17 Thread Jason Gunthorpe
On Thu, Sep 17, 2020 at 06:06:14PM +0200, Christian König wrote: > > > If it is already taking a page fault I'm not sure the extra function > > > call indirection is going to be a big deal. Having a uniform VMA > > > sounds saner than every driver custom rolling something. > > > > > > When I unwou

Re: [Linaro-mm-sig] Changing vma->vm_file in dma_buf_mmap()

2020-09-17 Thread Christian König
Am 17.09.20 um 17:37 schrieb Daniel Vetter: On Thu, Sep 17, 2020 at 5:24 PM Jason Gunthorpe wrote: On Thu, Sep 17, 2020 at 04:54:44PM +0200, Christian König wrote: Am 17.09.20 um 16:35 schrieb Jason Gunthorpe: On Thu, Sep 17, 2020 at 02:24:29PM +0200, Christian König wrote: Am 17.09.20 um 14

Re: [Linaro-mm-sig] Changing vma->vm_file in dma_buf_mmap()

2020-09-17 Thread Daniel Vetter
On Thu, Sep 17, 2020 at 5:24 PM Jason Gunthorpe wrote: > > On Thu, Sep 17, 2020 at 04:54:44PM +0200, Christian König wrote: > > Am 17.09.20 um 16:35 schrieb Jason Gunthorpe: > > > On Thu, Sep 17, 2020 at 02:24:29PM +0200, Christian König wrote: > > > > Am 17.09.20 um 14:18 schrieb Jason Gunthorpe:

Re: [Linaro-mm-sig] Changing vma->vm_file in dma_buf_mmap()

2020-09-17 Thread Jason Gunthorpe
On Thu, Sep 17, 2020 at 04:54:44PM +0200, Christian König wrote: > Am 17.09.20 um 16:35 schrieb Jason Gunthorpe: > > On Thu, Sep 17, 2020 at 02:24:29PM +0200, Christian König wrote: > > > Am 17.09.20 um 14:18 schrieb Jason Gunthorpe: > > > > On Thu, Sep 17, 2020 at 02:03:48PM +0200, Christian König

Re: [Linaro-mm-sig] Changing vma->vm_file in dma_buf_mmap()

2020-09-17 Thread Christian König
Am 17.09.20 um 16:35 schrieb Jason Gunthorpe: On Thu, Sep 17, 2020 at 02:24:29PM +0200, Christian König wrote: Am 17.09.20 um 14:18 schrieb Jason Gunthorpe: On Thu, Sep 17, 2020 at 02:03:48PM +0200, Christian König wrote: Am 17.09.20 um 13:31 schrieb Jason Gunthorpe: On Thu, Sep 17, 2020 at 1

Re: [Linaro-mm-sig] Changing vma->vm_file in dma_buf_mmap()

2020-09-17 Thread Jason Gunthorpe
On Thu, Sep 17, 2020 at 02:24:29PM +0200, Christian König wrote: > Am 17.09.20 um 14:18 schrieb Jason Gunthorpe: > > On Thu, Sep 17, 2020 at 02:03:48PM +0200, Christian König wrote: > > > Am 17.09.20 um 13:31 schrieb Jason Gunthorpe: > > > > On Thu, Sep 17, 2020 at 10:09:12AM +0200, Daniel Vetter w

Re: [Linaro-mm-sig] Changing vma->vm_file in dma_buf_mmap()

2020-09-17 Thread Daniel Vetter
On Thu, Sep 17, 2020 at 02:24:29PM +0200, Christian König wrote: > Am 17.09.20 um 14:18 schrieb Jason Gunthorpe: > > On Thu, Sep 17, 2020 at 02:03:48PM +0200, Christian König wrote: > > > Am 17.09.20 um 13:31 schrieb Jason Gunthorpe: > > > > On Thu, Sep 17, 2020 at 10:09:12AM +0200, Daniel Vetter w

Re: [Linaro-mm-sig] Changing vma->vm_file in dma_buf_mmap()

2020-09-17 Thread Christian König
Am 17.09.20 um 14:18 schrieb Jason Gunthorpe: On Thu, Sep 17, 2020 at 02:03:48PM +0200, Christian König wrote: Am 17.09.20 um 13:31 schrieb Jason Gunthorpe: On Thu, Sep 17, 2020 at 10:09:12AM +0200, Daniel Vetter wrote: Yeah, but it doesn't work when forwarding from the drm chardev to the dma

Re: [Linaro-mm-sig] Changing vma->vm_file in dma_buf_mmap()

2020-09-17 Thread Jason Gunthorpe
On Thu, Sep 17, 2020 at 02:03:48PM +0200, Christian König wrote: > Am 17.09.20 um 13:31 schrieb Jason Gunthorpe: > > On Thu, Sep 17, 2020 at 10:09:12AM +0200, Daniel Vetter wrote: > > > > > Yeah, but it doesn't work when forwarding from the drm chardev to the > > > dma-buf on the importer side, si

Re: [Linaro-mm-sig] Changing vma->vm_file in dma_buf_mmap()

2020-09-17 Thread Christian König
Am 17.09.20 um 13:31 schrieb Jason Gunthorpe: On Thu, Sep 17, 2020 at 10:09:12AM +0200, Daniel Vetter wrote: Yeah, but it doesn't work when forwarding from the drm chardev to the dma-buf on the importer side, since you'd need a ton of different address spaces. And you still rely on the core cod

Re: [Linaro-mm-sig] Changing vma->vm_file in dma_buf_mmap()

2020-09-17 Thread Jason Gunthorpe
On Thu, Sep 17, 2020 at 10:09:12AM +0200, Daniel Vetter wrote: > Yeah, but it doesn't work when forwarding from the drm chardev to the > dma-buf on the importer side, since you'd need a ton of different > address spaces. And you still rely on the core code picking up your > pgoff mangling, which f

Re: [Linaro-mm-sig] Changing vma->vm_file in dma_buf_mmap()

2020-09-17 Thread Daniel Vetter
On Thu, Sep 17, 2020 at 9:11 AM Christian König wrote: > > Am 17.09.20 um 08:23 schrieb Daniel Vetter: > > On Wed, Sep 16, 2020 at 5:31 PM Christian König > > wrote: > >> Am 16.09.20 um 17:24 schrieb Daniel Vetter: > >>> On Wed, Sep 16, 2020 at 4:14 PM Christian König > >>> wrote: > Am 16.0

Re: [Linaro-mm-sig] Changing vma->vm_file in dma_buf_mmap()

2020-09-17 Thread Christian König
Am 17.09.20 um 08:23 schrieb Daniel Vetter: On Wed, Sep 16, 2020 at 5:31 PM Christian König wrote: Am 16.09.20 um 17:24 schrieb Daniel Vetter: On Wed, Sep 16, 2020 at 4:14 PM Christian König wrote: Am 16.09.20 um 16:07 schrieb Jason Gunthorpe: On Wed, Sep 16, 2020 at 11:53:59AM +0200, Danie

Re: [Linaro-mm-sig] Changing vma->vm_file in dma_buf_mmap()

2020-09-16 Thread Daniel Vetter
On Wed, Sep 16, 2020 at 5:31 PM Christian König wrote: > > Am 16.09.20 um 17:24 schrieb Daniel Vetter: > > On Wed, Sep 16, 2020 at 4:14 PM Christian König > > wrote: > >> Am 16.09.20 um 16:07 schrieb Jason Gunthorpe: > >>> On Wed, Sep 16, 2020 at 11:53:59AM +0200, Daniel Vetter wrote: > >>> > >>>

Re: [Linaro-mm-sig] Changing vma->vm_file in dma_buf_mmap()

2020-09-16 Thread Christian König
Am 16.09.20 um 17:24 schrieb Daniel Vetter: On Wed, Sep 16, 2020 at 4:14 PM Christian König wrote: Am 16.09.20 um 16:07 schrieb Jason Gunthorpe: On Wed, Sep 16, 2020 at 11:53:59AM +0200, Daniel Vetter wrote: But within the driver, we generally need thousands of these, and that tends to bring