Phoronix: TimeGraph: A Linux GPU Command Scheduler
In preparing for XDC2011 Chicago, the X.Org developers' summit that begins in just ten days that I have organized, the schedule is being worked out at the moment. One of the items that is set to be talked about at XDC2011 during the Nouveau driver discussion is TimeGraph. This is an open-source GPU command scheduler that sounds fairly interesting.
Is the command scheduler on the GPU something new & unique? Do nouveau and AMD's open source drivers currently have no scheduler? Do the proprietary drivers have such schedulers?
AFAIK the radeon kernel driver loads commands into the ring in the sequence the requests arrive from client drivers, without prioritization. The proprietary drivers have some priority logic but this probably *is* new and cool for the open source drivers.
Right. From my understanding, this really has nothing at all to do with improving performance for single applications that are the sole consumer of the graphics hardware (e.g. a fullscreen game). It's about ensuring that two or more apps using the GPU simultaneously don't screw each other over in horrible ways. Without a proper scheduler, two apps running on the GPU may get only 10% of the performance they'd get by themselves (rather than the 50% you might expect) because each app is booting the others' computations and memory data out, causing a lot of thrashing and synchronization bottlenecks. The scheduler would allow them to get closer to that ideal 50% utilization each. Games benefit if other apps are trying to use the GPU while you're gaming, but otherwise this work is not likely to have any kind of impact on gaming.
(Granted, as more and more apps are using the GPU for general purpose processing, this is of course very important to ensuring that your games don't behave poorly when other apps are running.)
Current FIFO-like scheduler in kernel is quite to simple right, but too much configurability, and too complex design will make it hard to merge this into mainline kernel. I hope they will somehow divide this into pieces (because even simple priority queuing and fair bandwidth sharing will help), and that changes will benefit all GPUs.
This is quite important for desktop user, as currently multiple applications, desktop and games uses OpenGL/OpenCL and other GPU acceleration in the same time.
It could have improvements for single apps too; the scheduler could batch/reorder calls, remove duplicates/no-ops...
Good point. I wonder whether that's something that would be best handled in the scheduler or the GL driver, though? Ideal ordering of the commands may be based on a lot of factors that the scheduler couldn't easily ascertain but which the code actually generating the commands could. Certainly beyond my level of driver programming knowledge.