Mark Vojkovich writes:
 >   Can we export to the drivers some function that yields the CPU?
 > Currently alot of drivers burn the CPU waiting for fifos, etc...
 > usleep(0) is not good for this because it's jiffy based and usually
 > never returns in less than 10 msec which has the effect of making
 > interactivity worse instead of better.  I'm not sure which platforms 
 > don't export sched_yield() and which will need alternative 
 > implementations.
 > 

I've experimented with sched_yield in drivers when waiting for retrace
on video playback. It turned out that when the system was otherwise
idle the video performance was about the same. However when another 
application was using its full time slice the video frame rate would 
drop far below the screen refresh rate. 

I've measured the latencies and it turned out that the time elapsed
before the process would be rescheduled was considerably higher than
the average time the process was hanging in the wait loop when the
system was otherwise busy.
Shorter (or variable) time slices may help here, but a better solution
would be to use an event (ie. interrupt) driven rescheduling.
This would require a small kernel support module for each driver, 
though.

Egbert.
_______________________________________________
Devel mailing list
[EMAIL PROTECTED]
http://XFree86.Org/mailman/listinfo/devel

Reply via email to