Re: Regression: Re: [PATCH 2/3] drm/amdgpu: fix amdgpu_ttm_bind

2017-09-05 Thread Felix Kuehling
On 2017-09-02 03:52 AM, Christian König wrote: > Ah, crap yeah that won't work. > > Yeah, we should block userptr BOs in amdgpu_ttm_bind() for now. > >> There is something else still broken in our IPC test for system memory >> also, but I'll have to rewrite that anyway to work for large BOs with a

Re: Regression: Re: [PATCH 2/3] drm/amdgpu: fix amdgpu_ttm_bind

2017-09-02 Thread Christian König
Thinking more about this it looks like a general bug in the userptr put_page handling. Patch to fix this is on the list, Christian. Am 02.09.2017 um 09:52 schrieb Christian König: Ah, crap yeah that won't work. Yeah, we should block userptr BOs in amdgpu_ttm_bind() for now. There is somethi

Re: Regression: Re: [PATCH 2/3] drm/amdgpu: fix amdgpu_ttm_bind

2017-09-02 Thread Christian König
Ah, crap yeah that won't work. Yeah, we should block userptr BOs in amdgpu_ttm_bind() for now. There is something else still broken in our IPC test for system memory also, but I'll have to rewrite that anyway to work for large BOs with a small GART. Hui? Well userptr BOs can't be used for IPC,

Re: Regression: Re: [PATCH 2/3] drm/amdgpu: fix amdgpu_ttm_bind

2017-09-01 Thread Felix Kuehling
Actually, I read that wrong. It does GART bind userptr BOs. But it also unpins and repins them accidentally in the process, since ttm_bo_move_ttm calls backend_unbind and backend_bind callbacks. And ends up corrupting some kernel page state, because we had to move the pinning of user pages out of b

Re: Regression: Re: [PATCH 2/3] drm/amdgpu: fix amdgpu_ttm_bind

2017-09-01 Thread Felix Kuehling
It also seems to break GART binding of userptr BOs. Since backend_bind doesn't do GART binding for userptr BOs, they now don't get GART bound at all. There is something else still broken in our IPC test for system memory also, but I'll have to rewrite that anyway to work for large BOs with a small

Re: Regression: Re: [PATCH 2/3] drm/amdgpu: fix amdgpu_ttm_bind

2017-09-01 Thread Christian König
Yeah, the bug is really obvious after you pointed it out. We just need to keep the placement flags. Going to send a fix to the list in a minute, Christian. Am 01.09.2017 um 00:50 schrieb Felix Kuehling: I believe this patch breaks pinned GTT BOs. It trips KFD tests that apply a lot of memory p

Regression: Re: [PATCH 2/3] drm/amdgpu: fix amdgpu_ttm_bind

2017-08-31 Thread Felix Kuehling
I believe this patch breaks pinned GTT BOs. It trips KFD tests that apply a lot of memory pressure on one of our test systems. I understand the cause of the problem (see my analysis below), but I'm not sure how to solve it, without reverting the patch. Christian, do you have any ideas? Should we a

[PATCH 2/3] drm/amdgpu: fix amdgpu_ttm_bind

2017-08-23 Thread Christian König
From: Christian König Use ttm_bo_mem_space instead of manually allocating GART space. This allows us to evict BOs when there isn't enought GART space any more. Signed-off-by: Christian König --- drivers/gpu/drm/amd/amdgpu/amdgpu_gtt_mgr.c | 14 + drivers/gpu/drm/amd/amdgpu/amdgpu_