[Mesa-dev] [PATCH 9/9] winsys/amdgpu: pass the BO list via the CS ioctl on DRM >= 3.27.0

Marek Olšák maraeo at gmail.com
Thu Jul 12 21:02:56 UTC 2018


On Thu, Jul 12, 2018 at 7:07 AM, Michel Dänzer <michel at daenzer.net> wrote:
> On 2018-07-12 12:12 PM, Timothy Arceri wrote:
>>
>>
>> On 12/07/18 19:00, Michel Dänzer wrote:
>>> On 2018-07-12 07:26 AM, Marek Olšák wrote:
>>>> From: Marek Olšák <marek.olsak at amd.com>
>>>>
>>>> TODO: requires latest libdrm for amdgpu_bo_handle_type_kms_noimport
>>>> ---
>>>>   src/gallium/winsys/amdgpu/drm/amdgpu_bo.c |  6 +++
>>>>   src/gallium/winsys/amdgpu/drm/amdgpu_bo.h |  2 +
>>>>   src/gallium/winsys/amdgpu/drm/amdgpu_cs.c | 54 +++++++++++++++++++++--
>>>>   3 files changed, 58 insertions(+), 4 deletions(-)
>>>>
>>>> diff --git a/src/gallium/winsys/amdgpu/drm/amdgpu_bo.c
>>>> b/src/gallium/winsys/amdgpu/drm/amdgpu_bo.c
>>>> index e3d56613dfa..eba8d6e8b3d 100644
>>>> --- a/src/gallium/winsys/amdgpu/drm/amdgpu_bo.c
>>>> +++ b/src/gallium/winsys/amdgpu/drm/amdgpu_bo.c
>>>> @@ -473,20 +473,22 @@ static struct amdgpu_winsys_bo
>>>> *amdgpu_create_bo(struct amdgpu_winsys *ws,
>>>>      bo->u.real.va_handle = va_handle;
>>>>      bo->initial_domain = initial_domain;
>>>>      bo->unique_id = __sync_fetch_and_add(&ws->next_bo_unique_id, 1);
>>>>      bo->is_local = !!(request.flags &
>>>> AMDGPU_GEM_CREATE_VM_ALWAYS_VALID);
>>>>        if (initial_domain & RADEON_DOMAIN_VRAM)
>>>>         ws->allocated_vram += align64(size, ws->info.gart_page_size);
>>>>      else if (initial_domain & RADEON_DOMAIN_GTT)
>>>>         ws->allocated_gtt += align64(size, ws->info.gart_page_size);
>>>>   +   amdgpu_bo_export(bo->bo, amdgpu_bo_handle_type_kms_noimport,
>>>> &bo->u.real.kms_handle);
>>>
>>> How does using amdgpu_bo_handle_type_kms instead affect the numbers?
>>>
>>
>> The stats are in the cover letter but I think it would be worth Marek
>> adding them to the commit messages of the patches in some form for
>> future reference.
>>
>> The maximum glxgears FPS improves as follows.
>>
>> Initially: 13285
>> 8 patches: 14403 (+8.4% vs initial)
>> + patch 9: 15498 (+16.6% vs initial)
>
> I'm asking what the final number is when using amdgpu_bo_handle_type_kms
> instead of amdgpu_bo_handle_type_kms_noimport in the last patch.

My intent is not to thrash the hash table in libdrm. I don't plan to
measure the numbers between type_kms and type_kms_noimport. All I need
to know is that noimport is not slower (i.e. there is no risk), and
any improvement above that is just a bonus. Many trivial performance
improvements in the driver were done with little to no measurements.

Marek


More information about the mesa-dev mailing list