Fence wait in mmu_interval_notifier_ops::invalidate
Thomas Hellström (Intel)
thomas_os at shipmail.org
Sun Dec 13 15:09:25 UTC 2020
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 pinning as the locking mechanism. Drivers using
> mmu notifier should not be taking pins.
>
> Keep in mind this was all built for HW with real shadow page tables
> that can do fine grained manipulation.
OK yes, that makes sense and in that context the fence wait is easier to
understand. Looks like for example the radeon driver is using the
notifier + get_user_pages() but there it looks like it's used to avoid
having get_user_pages() clash with invalidation.
/Thomas
>
> The GPU version of this to instead manipulate a command queue is a big
> aberration from what was intended.
>
> Jason
More information about the dri-devel
mailing list