[PATCH] drm/amd: fix scheduler fence teardown order

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, Oct 28, 2016 at 6:08 PM, Christian König
<deathsimple at vodafone.de> wrote:
> From: Christian König <christian.koenig at amd.com>
>
> Some fences might be alive even after we have stopped the scheduler leading
> to warnings about leaked objects from the SLUB allocator.
>
> Fix this by allocating/freeing the SLUB allocator from the module
> init/finfi functions just like we do it for hw fences.
>
> Reported-by: Grazvydas Ignotas <notasas at gmail.com>
> Signed-off-by: Christian König <christian.koenig at amd.com>
> ---

...

> diff --git a/drivers/gpu/drm/amd/scheduler/gpu_scheduler.h b/drivers/gpu/drm/amd/scheduler/gpu_scheduler.h
> index 7cbbbfb..28a0d8f 100644
> --- a/drivers/gpu/drm/amd/scheduler/gpu_scheduler.h
> +++ b/drivers/gpu/drm/amd/scheduler/gpu_scheduler.h
> @@ -145,6 +145,9 @@ void amd_sched_entity_fini(struct amd_gpu_scheduler *sched,
>                            struct amd_sched_entity *entity);
>  void amd_sched_entity_push_job(struct amd_sched_job *sched_job);
>
> +int amd_sched_fence_slab_init(void);
> +void amd_sched_fence_slab_fini(void);
> +
>  struct amd_sched_fence *amd_sched_fence_create(
>         struct amd_sched_entity *s_entity, void *owner);
>  void amd_sched_fence_scheduled(struct amd_sched_fence *fence);
> diff --git a/drivers/gpu/drm/amd/scheduler/sched_fence.c b/drivers/gpu/drm/amd/scheduler/sched_fence.c
> index 3653b5a..8c7b5ee 100644
> --- a/drivers/gpu/drm/amd/scheduler/sched_fence.c
> +++ b/drivers/gpu/drm/amd/scheduler/sched_fence.c
> @@ -27,6 +27,25 @@
>  #include <drm/drmP.h>
>  #include "gpu_scheduler.h"
>
> +struct kmem_cache *sched_fence_slab;

Can become static now I guess?


Gražvydas


[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux