Fence wait in mmu_interval_notifier_ops::invalidate
Christian König
christian.koenig at amd.com
Mon Dec 14 10:21:07 UTC 2020
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 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.
> I think the radeon userptr implementation is bad enough that Christian
> wants to outright remove it. At least he keeps talking about doing that.
Oh, yes :) Key point is having time for that.
Christian.
>
> So maybe not a good example to look at :-)
> -Daniel
>
>>> The GPU version of this to instead manipulate a command queue is a big
>>> aberration from what was intended.
>>>
>>> Jason
>> _______________________________________________
>> dri-devel mailing list
>> dri-devel at lists.freedesktop.org
>> https://nam11.safelinks.protection.outlook.com/?url=https%3A%2F%2Flists.freedesktop.org%2Fmailman%2Flistinfo%2Fdri-devel&data=04%7C01%7Cchristian.koenig%40amd.com%7C4c7b622de2cf4b71c44a08d8a015ffc3%7C3dd8961fe4884e608e11a82d994e183d%7C0%7C0%7C637435363637046663%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=qJXWXbMXoUfDqpAsK76TIBDj8nOu9xZ66GLXCjZcNQM%3D&reserved=0
More information about the dri-devel
mailing list