Vincent Bernat wrote:
OoO En cette soirée bien amorcée du dimanche 27 juin 2004, vers 22:49, Vincent Bernat <bernat@free.fr> disait:In a system with 4 DVB cards, I sometimes get a EOVERFLOW error when trying to read from the card. I have raised MAX_EVENTS with no success. How can I prevent this ?I have slightly modified the kernel to get some debug output : dmxdev: buffer overflow (len: 188, free: 188) dvb_dmxdev_ts_callback [415]: overflow dmxdev: buffer overflow (len: 188, free: 188) dvb_dmxdev_ts_callback [415]: overflow dmxdev: buffer overflow (len: 188, free: 188) dvb_dmxdev_ts_callback [415]: overflow dmxdev: buffer overflow (len: 188, free: 188) dvb_dmxdev_ts_callback [415]: overflow The first line happens because len>=free in dvb_dmxdev_buffer_write in dmxdev.c. The second line happens when coming back in dvb_dmxdev_ts_callback. This is 100% reproducible when the systems has a high charge and happens sometimes otherwise.
Vincent, I have those buffer overruns as well, the problem however seems to be deeper as I can not find a relation to the cpu pressure ("high charge") but instead there is a statistic peak around 2gb boundaries of data reads (kernel 2.4 system). Since highlevel video decoder tools can get away with partial packet loss, one can recommend to modify the tool chain to ignore the eoverflow diagnostic. If you do have some time, may be you could play a bit with the ring buffer implementation in dmxdev_buffer_write. Personally I'd love to see a module option to set the ring buffer size to a higher value and then see what happens. Perhaps the interrupt hickup can be covered up with that as long as we don't get to the real cause. If you want to dig for the latter, a timestamp ringbuffer for reads/writes might give us some clues. Btw, did you guess why the modulo is there? It looks superfluous to my eyes or given a sign of bad implementation of the ring buffer algorithm used by dmxdev_buffer_write. have fun, -- guido http://google.de/search?q=guidod GCS/E/S/P C++/++++$ ULHS L++w- N++@ s+:a d(+-) r+@>+++ y++