Mailing List archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[vdr] Re: [PATCH] Reduce CPU usage during playback



Sascha Volkenandt wrote:
At Freitag, 13. Juni 2003 19:15 Jon Burgess wrote:

Remarkable is, that this patch applies at a completely different location (Poller GETS data, but no playFrame is available afterwards) and drops CPU
This patch (from Sascha) works for me as well, in fact it works better than the one I posted. I think they both accomplish more or less the same thing - to slow down the iteractions around the dvbplayer::Action loop when waiting for the non blocking file reader to provide data for the ringbuffer + output device.

I think your patch works better because it inserts the delay when there is no data to take from the ringbuffer to the output device, where as my patch inserts the delay when there was no data to take from the file reader to the ringbuffer. Hence my approach would insert a delay, even if there was actually data remaining in the ringbuffer which could be fed to the output device. Your approach only waits when there is truly nothing that the action loop can do to help provide data to the output device.

Both patches catch the real CPU hog situation which occurs when both the ringbuffer and the file reader have no data available, but the output device was will to accept data (hence the poll() returns immeadiately).

As another data point, I only see the excess CPU load after a playback has been running for some 5 - 10 seconds (without the patch), perhaps there is some subtle timing or interaction problem that causes the worst case to only appear on some systems.

Jon




--
Info:
To unsubscribe send a mail to ecartis@linuxtv.org with "unsubscribe vdr" as subject.



Home | Main Index | Thread Index