Re: Fence wait in mmu_interval_notifier_ops::invalidate

2020-12-14 Thread Christian König
Am 14.12.20 um 10:52 schrieb Daniel Vetter: On Sun, Dec 13, 2020 at 04:09:25PM +0100, Thomas Hellström (Intel) wrote: On 12/11/20 1:46 PM, Jason Gunthorpe wrote: On Fri, Dec 11, 2020 at 08:50:53AM +0100, Thomas Hellström (Intel) wrote: My understanding of this particular case is that hardware

Re: Fence wait in mmu_interval_notifier_ops::invalidate

2020-12-14 Thread Daniel Vetter
On Sun, Dec 13, 2020 at 04:09:25PM +0100, Thomas Hellström (Intel) wrote: > > On 12/11/20 1:46 PM, Jason Gunthorpe wrote: > > On Fri, Dec 11, 2020 at 08:50:53AM +0100, Thomas Hellström (Intel) wrote: > > > > > My understanding of this particular case is that hardware would continue > > > to > >

Re: Fence wait in mmu_interval_notifier_ops::invalidate

2020-12-14 Thread Jason Gunthorpe
On Fri, Dec 11, 2020 at 08:50:53AM +0100, Thomas Hellström (Intel) wrote: > My understanding of this particular case is that hardware would continue to > DMA to orphaned pages that are pinned until the driver is done with > DMA, mmu notifier replaces pinning as the locking mechanism. Drivers usin

Re: Fence wait in mmu_interval_notifier_ops::invalidate

2020-12-13 Thread Intel
On 12/11/20 1:46 PM, Jason Gunthorpe wrote: On Fri, Dec 11, 2020 at 08:50:53AM +0100, Thomas Hellström (Intel) wrote: My understanding of this particular case is that hardware would continue to DMA to orphaned pages that are pinned until the driver is done with DMA, mmu notifier replaces pinn

Re: Fence wait in mmu_interval_notifier_ops::invalidate

2020-12-11 Thread Intel
On 12/11/20 9:57 AM, Christian König wrote: Am 11.12.20 um 08:50 schrieb Thomas Hellström (Intel): Hi, Christian Thanks for the reply. On 12/10/20 11:53 AM, Christian König wrote: Am 09.12.20 um 17:46 schrieb Thomas Hellström (Intel): On 12/9/20 5:37 PM, Jason Gunthorpe wrote: On Wed, Dec

Re: Fence wait in mmu_interval_notifier_ops::invalidate

2020-12-11 Thread Christian König
Am 11.12.20 um 08:50 schrieb Thomas Hellström (Intel): Hi, Christian Thanks for the reply. On 12/10/20 11:53 AM, Christian König wrote: Am 09.12.20 um 17:46 schrieb Thomas Hellström (Intel): On 12/9/20 5:37 PM, Jason Gunthorpe wrote: On Wed, Dec 09, 2020 at 05:36:16PM +0100, Thomas Hellström

Re: Fence wait in mmu_interval_notifier_ops::invalidate

2020-12-10 Thread Intel
Hi, Christian Thanks for the reply. On 12/10/20 11:53 AM, Christian König wrote: Am 09.12.20 um 17:46 schrieb Thomas Hellström (Intel): On 12/9/20 5:37 PM, Jason Gunthorpe wrote: On Wed, Dec 09, 2020 at 05:36:16PM +0100, Thomas Hellström (Intel) wrote: Jason, Christian In most implementati

Re: Fence wait in mmu_interval_notifier_ops::invalidate

2020-12-10 Thread Christian König
Am 09.12.20 um 17:46 schrieb Thomas Hellström (Intel): On 12/9/20 5:37 PM, Jason Gunthorpe wrote: On Wed, Dec 09, 2020 at 05:36:16PM +0100, Thomas Hellström (Intel) wrote: Jason, Christian In most implementations of the callback mentioned in the subject there's a fence wait. What exactly is

Re: Fence wait in mmu_interval_notifier_ops::invalidate

2020-12-10 Thread Jason Gunthorpe
On Wed, Dec 09, 2020 at 05:36:16PM +0100, Thomas Hellström (Intel) wrote: > Jason, Christian > > In most implementations of the callback mentioned in the subject there's a > fence wait. > What exactly is it needed for? Invalidate must stop DMA before returning, so presumably drivers using a dma f

Re: Fence wait in mmu_interval_notifier_ops::invalidate

2020-12-09 Thread Intel
On 12/9/20 5:37 PM, Jason Gunthorpe wrote: On Wed, Dec 09, 2020 at 05:36:16PM +0100, Thomas Hellström (Intel) wrote: Jason, Christian In most implementations of the callback mentioned in the subject there's a fence wait. What exactly is it needed for? Invalidate must stop DMA before returning