On Fri, 17 Oct 2003, David Fox wrote:[snip]
I think that the wisest approach is, instead of suggesting a kernel module to the XFree86 folks, you do two things. First, suggest a kernel module to the Linux folks that implements a protocol for accessing the resource you are trying to use. Then you go to the XFree86 folks and suggest a module to utilize that protocol in the X server.
I have no code to show ;-) but I have a case where a kernel module is unavoidable to get out of the statu quo : M. Voijkovich asked about the use of sched_yield() in order to wait for the FIFO to process a big enough part of the DMA buffer before we try to refill it; his idea was to smartly release the CPU because we know that the driver will have to wait quite a while before the GPU has processed the datas. But we also need to get the CPU back fast enough in order to have a unbroken stream of data fed to the GPU.Now the driver is busy looping (correct me if I wrong) which is a waste of CPU. Using sched_yield() for 2.6.x linux kernels will lead to bad latency (basically we will reacquire the CPU very lately). The last alternative (at least following R. Russel and R.M. Love) is to have a kernel module which can poll the DMA to see how much has already been sent to the GPU, and when enough has been processed, this kernel module wakes up the driver in userland (using futexes). This approach could work with all these types of "rather long" waits where it is not really smart to busy loop (one assumption is that the wait can be long enough that we will consume our whole timeslice busy looping, which will also lead to a bad score on "interactiveness" on newer linux kernels, and also we will have to wait until we reacquire the CPU). R. Russel seems to be OK to help if the XFree guys wanted to go this way. I must add that M. Vojkovich did not like the idea of a kernel module.What _specific_ area of XFree86 performance are you (or anyone else) thinking needs improvement, what solutions have you investigated or even thought about which could improve this performance by modifying XFree86 itself, a driver, Mesa, or other userland code? If you do think the kernel might help for this problem, what steps have you taken to determine if that is truely reasonable, and have you tested your theory? Have you discussed that one small idea with other developers to see what they think about the alleged problem, wether it even really is a problem at all, how important it is, what other solutions there might be, etc. etc. etc.
All of this "lets stuff things in the kernel, because kernel code is automatically 20000 times faster right?" stuff gets boring fast.
Show me the code.
My 2 cents...
Bye
Manu
_______________________________________________ Devel mailing list [EMAIL PROTECTED] http://XFree86.Org/mailman/listinfo/devel
