[PATCH 0/6] A few drm_syncobj optimisations

Tvrtko Ursulin tvrtko.ursulin at igalia.com
Fri Jan 3 10:37:58 UTC 2025


On 02/01/2025 19:44, Tvrtko Ursulin wrote:
> From: Tvrtko Ursulin <tvrtko.ursulin at igalia.com>
> 
> A small set of drm_syncobj optimisations which should make things a tiny bit
> more efficient on the CPU side of things.
> 
> /Maybe/ between 1-2% more FPS can be observed with "vkgears -present-mailbox" on
> the Steam Deck Plasma desktop but I am reluctant to make a definitive claim. It
> would be best if someone could verify or suggest a more heavy workload for
> syncobjs.

Later I added two more patches to the series which add a fast path to 
replace the kmalloc/kfree path for vast majority of invocations.

For example during Cyberpunk 2077 benchmark 96.7% lookups is for a 
single syncobj, 3.2% for two, and nothing above 3. Syncobj wait 
distribution is very similar.

With that and some kernel hardening options turned off it still seems 
around 1.5% improvement for vkgears.

Regards,

Tvrtko

> Less lines of source code and "Every little helps" (tm), right?
> 
> Tvrtko Ursulin (6):
>    drm/syncobj: Avoid double memset in drm_syncobj_find_fence
>    drm/syncobj: Remove unhelpful helper
>    drm/syncobj: Do not allocate an array to store zeros
>    drm/syncobj: Avoid one temporary allocation in drm_syncobj_array_find
>    drm/syncobj: Use put_user in drm_syncobj_query_ioctl
>    drm/syncobj: Avoid temporary allocation in
>      drm_syncobj_timeline_signal_ioctl
> 
>   drivers/gpu/drm/drm_syncobj.c | 238 +++++++++++++++-------------------
>   1 file changed, 106 insertions(+), 132 deletions(-)
> 


More information about the dri-devel mailing list