[Mesa-dev] [PATCH] radv: Align large buffers to the fragment size.

Bas Nieuwenhuizen bas at basnieuwenhuizen.nl
Mon Nov 26 20:03:46 UTC 2018


On Mon, 26 Nov 2018, 20:48 Marek Olšák <maraeo at gmail.com wrote:

> You increase both virtual and physical alignment. Are you sure it's
> necessary to increase the physical alignment?
>

Hence the v2 which should not do that.

>
> Marek
>
> On Sun, Nov 25, 2018 at 11:13 PM Bas Nieuwenhuizen <
> bas at basnieuwenhuizen.nl> wrote:
>
>> Improves performance in Talos by about 15% (and significant improvements
>> in RotR and possibly other but did not bench with final patch) on
>> kernel 4.19 and earlier.
>>
>> On 4.20+ a similar effect comes from
>>
>> 433ca054949a "drm/amdgpu: try allocating VRAM as power of two"
>>
>> Given the simplicity of the patch and the impact, CC to stable?
>> ---
>>  src/amd/vulkan/winsys/amdgpu/radv_amdgpu_bo.c | 3 +++
>>  1 file changed, 3 insertions(+)
>>
>> diff --git a/src/amd/vulkan/winsys/amdgpu/radv_amdgpu_bo.c
>> b/src/amd/vulkan/winsys/amdgpu/radv_amdgpu_bo.c
>> index 25764d93f6a..6d1739fe5cf 100644
>> --- a/src/amd/vulkan/winsys/amdgpu/radv_amdgpu_bo.c
>> +++ b/src/amd/vulkan/winsys/amdgpu/radv_amdgpu_bo.c
>> @@ -304,6 +304,9 @@ radv_amdgpu_winsys_bo_create(struct radeon_winsys
>> *_ws,
>>                 return NULL;
>>         }
>>
>> +       if (size >= ws->info.pte_fragment_size)
>> +               alignment = MAX2(alignment, ws->info.pte_fragment_size);
>> +
>>         r = amdgpu_va_range_alloc(ws->dev, amdgpu_gpu_va_range_general,
>>                                   size, alignment, 0, &va, &va_handle,
>>                                   (flags & RADEON_FLAG_32BIT ?
>> AMDGPU_VA_RANGE_32_BIT : 0) |
>> --
>> 2.19.2
>>
>> _______________________________________________
>> mesa-dev mailing list
>> mesa-dev at lists.freedesktop.org
>> https://lists.freedesktop.org/mailman/listinfo/mesa-dev
>>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/mesa-dev/attachments/20181126/9641bc1c/attachment.html>


More information about the mesa-dev mailing list