Re: [PATCH] drm/amdgpu: fix potential VM faults

2019-09-25 Thread Christian König
Hi Monk, this patch doesn't prevents PD/PT eviction. The intention of the code here was that per VM BOs can evict other per VM BOs during allocation. The problem my patch fixes is that this unfortunately also meant that allocation PDs/PTs could evict other PDs/PTs from the same process. Re

RE: [PATCH] drm/amdgpu: fix potential VM faults

2019-09-25 Thread Liu, Monk
Hi Christian Theoretically the vm pt/pd should be allowed to be evicted like other BOs .. If you encountered page fault and could be avoided by this patch, that means there is bug in the VM/ttm system , and your patch simply w/a the root cause. _ Monk Liu|GP

Re: [PATCH] drm/amdgpu: fix potential VM faults

2019-09-19 Thread Christian König
If the page tables are reserved or fenced while you allocate a new one, they would not be evicted. And exactly that's not correct. The TTM_OPT_FLAG_ALLOW_RES_EVICT flag allows evicting of reserved objects. This is useful for allocating per VM BOs, but is of course completely fatal in all othe

Re: [PATCH] drm/amdgpu: fix potential VM faults

2019-09-19 Thread Kuehling, Felix
I'm not disagreeing with the change. Just trying to understand how this could have caused a VM fault. If the page tables are reserved or fenced while you allocate a new one, they would not be evicted. If they are not reserved or fenced, there should be no expectation that they stay resident. Is

Re: [PATCH] drm/amdgpu: fix potential VM faults

2019-09-19 Thread Deucher, Alexander
Acked-by: Alex Deucher From: amd-gfx on behalf of Christian König Sent: Thursday, September 19, 2019 4:41 AM To: amd-gfx@lists.freedesktop.org Subject: [PATCH] drm/amdgpu: fix potential VM faults When we allocate new page tables under memory pressure we should