Re: [PATCH] drm/amdgpu: fix amdgpu_amdkfd_remove_eviction_fence v2

2018-08-20 Thread Felix Kuehling
Hi Christian, Are you going to submit this change to amd-staging-drm-next? amd-kfd-staging would pick it up from there automatically. Regards,   Felix On 2018-08-15 01:57 PM, Felix Kuehling wrote: > I applied your change to my local KFD staging branch and it through a > presubmission build/test

Re: [PATCH] drm/amdgpu: fix amdgpu_amdkfd_remove_eviction_fence

2018-08-16 Thread Christian König
Am 16.08.2018 um 20:43 schrieb Felix Kuehling: On 2018-08-16 02:26 PM, Christian König wrote: Am 16.08.2018 um 20:23 schrieb Felix Kuehling: On 2018-08-16 02:18 PM, Christian König wrote: Am 16.08.2018 um 18:50 schrieb Felix Kuehling: On 2018-08-16 02:43 AM, Christian König wrote: [SNIP] I

Re: [PATCH] drm/amdgpu: fix amdgpu_amdkfd_remove_eviction_fence

2018-08-16 Thread Felix Kuehling
On 2018-08-16 02:26 PM, Christian König wrote: > Am 16.08.2018 um 20:23 schrieb Felix Kuehling: >> On 2018-08-16 02:18 PM, Christian König wrote: >>> Am 16.08.2018 um 18:50 schrieb Felix Kuehling: On 2018-08-16 02:43 AM, Christian König wrote: [SNIP] > I mean it could be that in the

Re: [PATCH] drm/amdgpu: fix amdgpu_amdkfd_remove_eviction_fence

2018-08-16 Thread Christian König
Am 16.08.2018 um 20:23 schrieb Felix Kuehling: On 2018-08-16 02:18 PM, Christian König wrote: Am 16.08.2018 um 18:50 schrieb Felix Kuehling: On 2018-08-16 02:43 AM, Christian König wrote: [SNIP] I mean it could be that in the worst case we race and stop a KFD process for no good reason. Right

Re: [PATCH] drm/amdgpu: fix amdgpu_amdkfd_remove_eviction_fence

2018-08-16 Thread Felix Kuehling
On 2018-08-16 02:18 PM, Christian König wrote: > Am 16.08.2018 um 18:50 schrieb Felix Kuehling: >> On 2018-08-16 02:43 AM, Christian König wrote: >> [SNIP] >>> I mean it could be that in the worst case we race and stop a KFD >>> process for no good reason. >> Right. For a more practical example, a

Re: [PATCH] drm/amdgpu: fix amdgpu_amdkfd_remove_eviction_fence

2018-08-16 Thread Christian König
Am 16.08.2018 um 18:50 schrieb Felix Kuehling: On 2018-08-16 02:43 AM, Christian König wrote: [SNIP] I mean it could be that in the worst case we race and stop a KFD process for no good reason. Right. For a more practical example, a KFD BO can get evicted just before the application decides to

Re: [PATCH] drm/amdgpu: fix amdgpu_amdkfd_remove_eviction_fence

2018-08-16 Thread Felix Kuehling
On 2018-08-16 02:43 AM, Christian König wrote: > Am 15.08.2018 um 20:49 schrieb Felix Kuehling: >> On 2018-08-15 02:27 PM, Christian König wrote: >>> Am 15.08.2018 um 20:17 schrieb Felix Kuehling: On 2018-08-15 03:02 AM, Christian König wrote: > Hi Felix, > > yeah, you pretty much

Re: [PATCH] drm/amdgpu: fix amdgpu_amdkfd_remove_eviction_fence

2018-08-15 Thread Christian König
Am 15.08.2018 um 20:49 schrieb Felix Kuehling: On 2018-08-15 02:27 PM, Christian König wrote: Am 15.08.2018 um 20:17 schrieb Felix Kuehling: On 2018-08-15 03:02 AM, Christian König wrote: Hi Felix, yeah, you pretty much nailed it. The problem is that the array itself is RCU protected. This m

Re: [PATCH] drm/amdgpu: fix amdgpu_amdkfd_remove_eviction_fence

2018-08-15 Thread Felix Kuehling
On 2018-08-15 02:27 PM, Christian König wrote: > Am 15.08.2018 um 20:17 schrieb Felix Kuehling: >> On 2018-08-15 03:02 AM, Christian König wrote: >>> Hi Felix, >>> >>> yeah, you pretty much nailed it. >>> >>> The problem is that the array itself is RCU protected. This means that >>> you can only c

Re: [PATCH] drm/amdgpu: fix amdgpu_amdkfd_remove_eviction_fence

2018-08-15 Thread Christian König
Am 15.08.2018 um 20:17 schrieb Felix Kuehling: On 2018-08-15 03:02 AM, Christian König wrote: Hi Felix, yeah, you pretty much nailed it. The problem is that the array itself is RCU protected. This means that you can only copy the whole structure when you want to update it. The exception is re

Re: [PATCH] drm/amdgpu: fix amdgpu_amdkfd_remove_eviction_fence

2018-08-15 Thread Felix Kuehling
On 2018-08-15 03:02 AM, Christian König wrote: > Hi Felix, > > yeah, you pretty much nailed it. > > The problem is that the array itself is RCU protected. This means that > you can only copy the whole structure when you want to update it. > > The exception is reservation_object_add_shared() which o

Re: [PATCH] drm/amdgpu: fix amdgpu_amdkfd_remove_eviction_fence v2

2018-08-15 Thread Felix Kuehling
I applied your change to my local KFD staging branch and it through a presubmission build/test (sorry, only accessible from inside AMD): http://git.amd.com:8080/#/c/167906/ It passed, but checkpatch pointed out one issue: http://git.amd.com:8080/#/c/167906/1/drivers/gpu/drm/amd/amdgpu/amdgpu_amdkf

[PATCH] drm/amdgpu: fix amdgpu_amdkfd_remove_eviction_fence v2

2018-08-15 Thread Christian König
Fix quite a number of bugs here. Unfortunately only compile tested. v2: fix copy&paste error Signed-off-by: Christian König --- drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gpuvm.c | 103 ++- 1 file changed, 46 insertions(+), 57 deletions(-) diff --git a/drivers/gpu/drm/amd/amd

Re: [PATCH] drm/amdgpu: fix amdgpu_amdkfd_remove_eviction_fence

2018-08-15 Thread Christian König
Hi Felix, yeah, you pretty much nailed it. The problem is that the array itself is RCU protected. This means that you can only copy the whole structure when you want to update it. The exception is reservation_object_add_shared() which only works because we replace an either signaled fence or

Re: [PATCH] drm/amdgpu: fix amdgpu_amdkfd_remove_eviction_fence

2018-08-14 Thread Felix Kuehling
[+Harish] I think this looks good for the most part. See one comment inline below. But bear with me while I'm trying to understand what was wrong with the old code. Please correct me if I get this wrong or point out anything I'm missing. The reservation_object_list looks to be protected by a com

[PATCH] drm/amdgpu: fix amdgpu_amdkfd_remove_eviction_fence

2018-08-14 Thread Christian König
Fix quite a number of bugs here. Unfortunately only compile tested. Signed-off-by: Christian König --- drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gpuvm.c | 103 ++- 1 file changed, 46 insertions(+), 57 deletions(-) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gpuvm.c