Hi, On Tue, 20 Apr 2021 at 13:01, Daniel Vetter wrote: > - We live in a post xf86-video-$vendor world, and all these other > compositors rely on implicit sync. You're not going to be able to get > rid of them anytime soon. What's worse, all the various EGL/vk buffer > sharing things also rely on implicit sync, so you get to fix up tons of > applications on top. Any plan that's realistic needs to cope with > implicit/explicit at the same time together won't work. > > - Absolute infuriating, but you can't use page-faulting together with any > dma_fence synchronization primitives, whether implicit or explicit. This > means until the entire ecosystem moved forward (good luck with that) we > have to support dma_fence. The only sync model that works together with > page faults is userspace fence based sync. > This should get rid of the oversync issues, and since implicit sync is > backed in everywhere right now, you'll have to deal with implicit sync for > a very long time. > Depends what you mean by 'implicit sync'. ;) Getting userspace (Vulkan WSI, EGL, Wayland compositors, browsers, media clients) over to explicit sync is easy, _provided_ that the explicit sync gives us the same guarantees as implicit sync, i.e. completes in bounded time, GPU/display work can be flushed to the kernel predicated on fence completion with the kernel handling synchronisation and scheduling. It's just a matter of typing, and until now we haven't had a great reason to do that typing. Now we do have that reason, so we are implementing it. Whether it's dma_fence or drm_syncobj is mostly immaterial; we can encode in protocol requirements that you can't try to use wait-before-signal with drm_syncobj and you'll get killed if you try. Getting that userspace over to fully userspace-based sync (wait-before-signal or wait-never-signal, no kernel assistance but you just have to roll your own polling or signal handling on either CPU or GPU side) is not easy. It might never happen, because it's an extraordinary amount of work, introduces a huge amount of fragility into a super-critical path, and and so far it's not clear that it's a global performance improvement for the whole system, just shifting performance problems from kernel to userspace, and probably (AFAICT) making them worse in addition to the other problems it brings. What am I missing? Cheers, Daniel