[PATCH 1/1] drm/ttm: Account for kernel allocations in kernel zone only
Koenig, Christian
Christian.Koenig at amd.com
Mon Feb 25 14:20:18 UTC 2019
Am 23.02.19 um 00:19 schrieb Kuehling, Felix:
> Don't account for them in other zones such as dma32. The kernel page
> allocator has its own heuristics to avoid exhausting special zones
> for regular kernel allocations.
>
> Signed-off-by: Felix Kuehling <Felix.Kuehling at amd.com>
> CC: thellstrom at vmware.com
> CC: christian.koenig at amd.com
Reviewed-by: Christian König <christian.koenig at amd.com>
> ---
> drivers/gpu/drm/ttm/ttm_memory.c | 6 +++---
> 1 file changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/gpu/drm/ttm/ttm_memory.c b/drivers/gpu/drm/ttm/ttm_memory.c
> index f1567c3..90d1e24 100644
> --- a/drivers/gpu/drm/ttm/ttm_memory.c
> +++ b/drivers/gpu/drm/ttm/ttm_memory.c
> @@ -522,7 +522,7 @@ static void ttm_mem_global_free_zone(struct ttm_mem_global *glob,
> void ttm_mem_global_free(struct ttm_mem_global *glob,
> uint64_t amount)
> {
> - return ttm_mem_global_free_zone(glob, NULL, amount);
> + return ttm_mem_global_free_zone(glob, glob->zone_kernel, amount);
> }
> EXPORT_SYMBOL(ttm_mem_global_free);
>
> @@ -621,10 +621,10 @@ int ttm_mem_global_alloc(struct ttm_mem_global *glob, uint64_t memory,
> {
> /**
> * Normal allocations of kernel memory are registered in
> - * all zones.
> + * the kernel zone.
> */
>
> - return ttm_mem_global_alloc_zone(glob, NULL, memory, ctx);
> + return ttm_mem_global_alloc_zone(glob, glob->zone_kernel, memory, ctx);
> }
> EXPORT_SYMBOL(ttm_mem_global_alloc);
>
More information about the amd-gfx
mailing list