Originally posted by mdedetrich
View Post
What GPU maker made the first Explicit sync only GPU? The answer Intel and it the early Intel igpu that were a complete disaster to write drivers for.
What was the direct advantage of intel igpu doing explicit sync? Reduced hardware silicon area.
There is a old saying failure to learn from history you are doomed to repeat it.
This intel igpu that was explicit sync only is in fact from before DRI2.
There is a very simple implicit sync thing need.
Process 1 shared memory with process 2. This need to increase implicit synced counter. So when either process 1 or 2 free that memory it reduces by one and only if the counter is zero so that nobody is using is the memory really freed.
Welcome to a fun reality., You don't do automatic memory garbage collection in software without implicit sync.
Go back and read over the eglstreams presentations you find Nvidia developers not describing how eglstreams is going to garbage collect GPU vram or GPU memory mapped into CPU memory. Turns they don't mention this. Then Nvidia implementation of eglstreams and API design does not allow for this.
Intel route from explicit sync igpu to gem to GBM/DMABUF. Turns out to be about dealing with the memory management problem. What makes this even worse is that DMABUF work was a joint project between Nvidia and Intel.
Nvidia did not want to open source their memory management code on their GPUs. This causes a big problem. Because the OS kernel memory management of the CPU and the GPU memory management need to be kept in sync so that counters on memory remain right. Like kernel terminates a process the vram allocated by the application need to have it counter for number of times in use need to be reduced.
This is what makes the eglstreams mess so god darn stupid. Both Intel and Nvidia jointly developed the solution to GPU memory garbage collection in DMABUF then Nvidia decided not to use it in eglstreams. Nvidia also argues hard with the Linux kernel developers over DMABUF because the Linux kernel developers keep on wanting to keep core structures to the Linux kernel GPLv2. Yes core memory management is OS core parts.
mdedetrich like it or not the argument that Nvidia was pushing for explicit sync is a smoke screen. What Nvidia was wanting was to keep their driver closed source. Going explicit sync where everything is managed by the applications themselves equals not having to work with the kernel. Problem going pure explicit sync like this causes total memory management failures Intel know this from the time of DRI1 and Nvidia failed to listen to Intel warnings.
Yes this Nvidia mistake has wasted a huge amount of developer time at gnome that went to into attempting to make the eglstreams backend work that could never be made work due to fundamental design fault that Nvidia had done in Eglstraems what was exactly copy of what Intel did in their early igpus.
By the way Intel was not the only other GPU vendor in history to make this goof up AMD and ARM did the same at other times this is why when everyone that works on mesa is like we will not implement eglstreams because they could see issues should have had alarm bells ringing at Nvidia thinking how many other things that Nvidia had created that Mesa developers just copied without argument.
Failure to learn from history can be very costly. Major stall to wayland development from this Nvidia mistake. Everyone does need to learn from this mistake. Big thing you GPU stack cannot be 100 percent explicit sync. You need implicit sync memory garbage collection yes DX12 has implicit sync memory garbage collection. This means somehow you need to mesh implicit sync with explicit sync effectively.
You want the performance gains explicit sync offers without screwing up the memory management this is a lot more complex problem. This explains part of why the Linux kernel developers were like you want to completely drop implicit sync what kind of garbage are you talking about. Remember the Linux kernel has a formal memory model of how it memory works and explicit sync memory management absolutely does not fit. In have you cannot create a formal memory model of a explicit sync memory model that produces the result saying that this design is possible safe. Yes memory management design says you cannot to explicit sync memory management and have it work in a multi process operating system.
Reality here is the eglstreams design is fundamentally broken and this come very clear when you attempt to do up a formal memory model of it.
Doing formal memory models does take a lot of time. Yes this is something the eglstreams designer skipped if they had not they would have see that lot of there so called eglstreams sales points were in fact 100 percent fatality causing defects.
Yes we do need to make sure that if anyone else has idea like eglstreams that is highly defective they stop quickly and see their major mistake so not to create a new mess.
Comment