Re: [PATCH 1/1] drm/ttm: Account for kernel allocations in kernel zone only

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

 



On 2/25/2019 2:58 PM, Thomas Hellstrom wrote:
> On Mon, 2019-02-25 at 14:20 +0000, Koenig, Christian wrote:
>> 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@xxxxxxx>
>>> CC: thellstrom@xxxxxxxxxx
>>> CC: christian.koenig@xxxxxxx
>> Reviewed-by: Christian König <christian.koenig@xxxxxxx>
> Hmm,
>
> So actually with this patch we theoretically still can exhaust the
> DMA32 zone by first performing kernel allocations that DO spare a
> number of DMA32 pages  according to the kernel allocator heuristics,
> and then populate TTM buffers with DMA32 pages only.
>
> However, since vmwgfx bo's don't request DMA32 pages, we're OK with
> this, and it's really up to Christian to decide. So:
>
> Acked-by: Thomas Hellstrom <thellstrom@xxxxxxxxxx>

Thanks. What's the best branch to submit this to? My patches were based 
on amd-staging-drm-next.

Regards,
   Felix

>
> Thanks,
> Thomas
>
>
>
>
>
>
>
>
>>> ---
>>>    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);
>>>    
_______________________________________________
amd-gfx mailing list
amd-gfx@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/amd-gfx




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

  Powered by Linux