From: Fei Yu <[email protected]>

On 11/17/26 10:39, Tvrtko Ursulin wrote:
> In practice there are multiple DRM syncobj operations (and/or ioctls) per
> rendered frame, and vast majority of them operates on a just a couple of
> handles, or timeline points.
>
> This series adds a fast path to avoid the temporary allocations for those 
> cases.

Tested on next-20261117 (x86_64, KASAN + KASAN_STACK, lockdep,
kmemleak, virtio-gpu in QEMU), base and patched with the same config:

- IGT syncobj_basic, syncobj_wait, syncobj_timeline: 202/202 on both,
  identical per subtest, dmesg clean.
- A targeted test for 1..8 handles (both sides of
  DRM_SYNCOBJ_FAST_PATH_ENTRIES) on all six array ioctls: success,
  -ENOENT with the bad handle at every position, -EFAULT for bad /
  partially unmapped handle and point arrays, refcounts balanced;
  wait-all / wait-any woken by sw_sync fence callbacks and by
  WAIT_FOR_SUBMIT; -ETIME and -EINTR followed by signalling the
  fences afterwards (nothing left on the stack entries); 20 s
  wait vs. reset/signal/query stress. All pass, no splats, kmemleak
  clean.
- The 1M handle limit still holds: 1M real syncobjs succeed on all
  six ioctls, 1M + 1 returns -EINVAL.
- Every patch builds with W=1 and sparse clean, i386 too.

Note the series depends on 6ca87397aeeb ("drm/syncobj: Limit the
number of handles and use kvmalloc for user-sized arrays"), which is
in drm-misc-fixes only, so it doesn't apply to drm-misc-next yet.

Reviewed-by: Fei Yu <[email protected]>
Tested-by: Fei Yu <[email protected]>

Thanks,
Fei

Reply via email to