[PATCH] drm/amdgpu: Use kvmalloc_array for allocating VRAM manager nodes array

Christian König christian.koenig at amd.com
Fri Jun 15 15:17:03 UTC 2018


Am 15.06.2018 um 17:12 schrieb Michel Dänzer:
> On 2018-06-15 05:05 PM, Christian König wrote:
>> Am 15.06.2018 um 16:27 schrieb Michel Dänzer:
>>> From: Michel Dänzer <michel.daenzer at amd.com>
>>>
>>> It can be quite big, and there's no need for it to be physically
>>> contiguous. This is less likely to fail under memory pressure (has
>>> actually happened while running piglit).
>> Mhm, the last time I looked a drm_mm node had around 160 bytes, which
>> means that you need to allocate more than 50MB of VRAM to fill up a 4K
>> page.
> I'm attaching the failure that prompted me to write this patch. It was
> trying to allocate order 5, i.e. more than 16 pages / 64 KB.

Wow, that means piglit is at some point allocating a texture of at least 
800MB. Something to keep in mind when sizing stuff in the MM.

Well the extra overhead is negligible for small allocations and the use 
case sounds valid.

Patch is Reviewed-by: Christian König <christian.koenig at amd.com>.

Regards,
Christian.


More information about the amd-gfx mailing list