Hi Mauro, On Wed, Jan 17, 2018 at 02:56:20PM -0200, Mauro Carvalho Chehab wrote: > Em Tue, 16 Jan 2018 05:40:35 +0100 > Frederic Weisbecker <[email protected]> escreveu: > > > So this set is in a testable state. I addressed preliminary reviews from > > Eric Dumazet, Paolo Abeni and Linus. > > > > You may want to play with MAX_SOFTIRQ_RESTART value, which is now the > > number of calls allowed for a vector in a jiffy frame before it gets > > queued to the workqueue. I set it to the arbitrary value of 20 which is > > likely too low. > > > > Also I'm not sure about the last patch. For example in the usecase of > > Dmitry Safonov it may be better not to apply it. I guess only testing > > and reviews can tell. > > > > git://git.kernel.org/pub/scm/linux/kernel/git/frederic/linux-dynticks.git > > softirq/thread > > > > HEAD: 5a4c02b25bdcd853e3874d5319492ea6097f6e70 > > > > Thanks, > > Frederic > > --- > > > > Frederic Weisbecker (5): > > softirq: Account time and iteration stats per vector > > softirq: Per vector deferment to workqueue > > softirq: Defer to workqueue when rescheduling is needed > > softirq: Replace ksoftirqd with workqueues entirely > > softirq: Reset vector call counter before workqueue completion > > > > > > Documentation/RCU/stallwarn.txt | 4 +- > > include/linux/interrupt.h | 7 +- > > kernel/sched/cputime.c | 12 +-- > > kernel/sched/sched.h | 4 +- > > kernel/softirq.c | 232 > > +++++++++++++++++++++++++--------------- > > net/ipv4/tcp_output.c | 5 +- > > 6 files changed, 161 insertions(+), 103 deletions(-) > > Hi Frederic, > > As reported on a separate thread: > http://lkml.iu.edu/hypermail/linux/kernel/1801.1/00110.html > > The current approach taken since Kernel 4.9 by this patch: > > https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=4cd13c21b207e80ddb1144c576500098f2d5f882 > > Broke applications that record a digital TV channel. > > The bug is easily reproductible on RPi3 with LibreELEC and tvheadend (with > both RPi downstram Kernel and with upstream Kernel 4.15-rc7). > > Your patchset seems to be better addressing the softirq needs, by only > deferring processing when really needed, instead of always doing it. > > I'm now testing if it fixes the issues with the media subsystem. > > All tests below were done on a Raspberry Pi3 with a SanDisk Extreme U3 microSD > card with 32GB and a DVBSky S960C DVB-S2 tuner with an external power supply, > connected to a TCP/IP network via Ethernet (with uses USB on RPi). It also > have a serial cable connected to it. > > On both systems, I'm running Kernel 4.15-rc7 + your > patches from this branch: > https://git.linuxtv.org/mchehab/experimental.git/log/?h=softirq_fixup > > TEST 1: Raspbian with v4l-utils > =============================== > > I booted RPi3 on a raspbian partition and installed v4l-utils from its > git tree. > > I added support at v4l-utils[1] to parse MPEG-TS continuity sequence number > on monitor mode. > > [1] https://git.linuxtv.org/v4l-utils.git/ > > Before testing on RPi3, I double-checked the new discontinuity detector > several times on an i7core machine, to be sure that it won't be > producing false alarms, while it would be detecting and reporting > discontinuities when they happens. > > On my tests, it is recording MPEG-TS data at ~60Mbits/s. > > On this test, it seems that your patchset addresses the issue. > > This is the results with your patchset and CONFIG_HZ=100: > > $ rm out.ts; dvbv5-zap -l universal -c ~/vivo-channels.conf NBR -m -X 300 -t > 300 -o out.ts 2>errors > > 62.67s: Starting capture > 206.82s: pid 2064, expecting 1 received 6 > 362.70s: Stopping capture > > PID FREQ SPEED TOTAL > 18 1439.01 p/s 2113.5 Kbps 79260 KB > 1901 933.19 p/s 1370.6 Kbps 51400 KB > 1911 1250.57 p/s 1836.8 Kbps 68881 KB > 1921 1280.59 p/s 1880.9 Kbps 70534 KB > 1931 1382.41 p/s 2030.4 Kbps 76143 KB > 1941 837.57 p/s 1230.2 Kbps 46133 KB > 1951 531.91 p/s 781.2 Kbps 29297 KB > 1961 531.91 p/s 781.2 Kbps 29297 KB > 1971 866.72 p/s 1273.0 Kbps 47738 KB > 1991 1187.88 p/s 1744.7 Kbps 65428 KB > 2001 784.59 p/s 1152.4 Kbps 43214 KB > 2011 770.16 p/s 1131.2 Kbps 42420 KB > 2031 1925.98 p/s 2828.8 Kbps 106082 KB > 2041 851.09 p/s 1250.0 Kbps 46877 KB > 2051 812.99 p/s 1194.1 Kbps 44779 KB > 2061 847.85 p/s 1245.3 Kbps 46699 KB > 2071 1416.26 p/s 2080.1 Kbps 78007 KB > 2081 1411.99 p/s 2073.9 Kbps 77771 KB > 2091 531.91 p/s 781.2 Kbps 29297 KB > 2101 531.91 p/s 781.2 Kbps 29297 KB > 2111 1287.53 p/s 1891.1 Kbps 70917 KB > 2131 845.45 p/s 1241.8 Kbps 46567 KB > 2141 870.95 p/s 1279.2 Kbps 47971 KB > 2151 2451.17 p/s 3600.2 Kbps 135009 KB > 2161 854.14 p/s 1254.5 Kbps 47045 KB > 2171 1211.97 p/s 1780.1 Kbps 66754 KB > 2191 7313.75 p/s 10742.1 Kbps 402837 KB > 8191 751.47 p/s 1103.7 Kbps 41390 KB > OTHER 3793.81 p/s 5572.2 Kbps 208961 KB 1 continuity errors > TOT 39506.70 p/s 58025.5 Kbps 2176006 KB > > Lock (0x1f) Signal= -66.52dBm C/N= 14.31dB postBER= 0 > > Having just a single continuity error on 300 seconds seems acceptable > (and it could be unrelated to Kernel handling). > > TEST 2 > ====== > > I booted a partition with LibreELEC 8.2.2 and tvheadend backend. > > I'm recording one MPEG-TS service/"channel" composed of one audio and > one video stream, while playing the same video twice via network, > using VLC. > > The total traffic collected by tvheadend was about 4 Mbits/s > (audio+video+EPG tables). It is part of a 58 mbits/s MPEG Transport > stream, with 23 TV service/"channels" on it. > > On LibreELEC, I'm now seeing those logs, just after boot: > > [ 9.262681] usb 1-1.4: DVB: adapter 0 frontend 0 frequency 0 out of range > (950000..2150000) > [ 9.330306] smsc95xx 1-1.1:1.0 eth0: link up, 100Mbps, full-duplex, lpa > 0xC1E1 > [ 13.282765] NOHZ: local_softirq_pending 08 > [ 13.331928] NOHZ: local_softirq_pending 08 > [ 13.480830] NOHZ: local_softirq_pending 08 > [ 13.531364] NOHZ: local_softirq_pending 40 > [ 13.820693] NOHZ: local_softirq_pending 08 > [ 13.868430] NOHZ: local_softirq_pending 08 > [ 14.088503] NOHZ: local_softirq_pending 08 > [ 16.137247] NOHZ: local_softirq_pending 08 > > I ran libreELEC for about one hour there, and got those errors: > > Jan 17 15:42:53 rpi3 tvheadend[238]: TS: DVB-S Network/12130H/NBR: H264 @ > #1911 Continuity counter error (total 3) > Jan 17 15:44:05 rpi3 tvheadend[238]: TS: DVB-S Network/12130H/NBR: H264 @ > #1911 Continuity counter error (total 5) > Jan 17 15:44:05 rpi3 tvheadend[238]: TS: DVB-S Network/12130H/NBR: MPEG2AUDIO > @ #1912 Continuity counter error (total 1) > Jan 17 15:45:11 rpi3 tvheadend[238]: TS: DVB-S Network/12130H/NBR: H264 @ > #1911 Continuity counter error (total 6) > Jan 17 15:45:21 rpi3 tvheadend[238]: TS: DVB-S Network/12130H/NBR: MPEG2AUDIO > @ #1912 Continuity counter error (total 2) > Jan 17 15:45:25 rpi3 tvheadend[238]: TS: DVB-S Network/12130H/NBR: H264 @ > #1911 Continuity counter error (total 8) > Jan 17 15:45:59 rpi3 tvheadend[238]: TS: DVB-S Network/12130H/NBR: H264 @ > #1911 Continuity counter error (total 10) > Jan 17 15:45:59 rpi3 tvheadend[238]: TS: DVB-S Network/12130H/NBR: MPEG2AUDIO > @ #1912 Continuity counter error (total 5) > Jan 17 15:47:39 rpi3 tvheadend[238]: TS: DVB-S Network/12130H/NBR: H264 @ > #1911 Continuity counter error (total 11) > Jan 17 15:47:39 rpi3 tvheadend[238]: TS: DVB-S Network/12130H/NBR: MPEG2AUDIO > @ #1912 Continuity counter error (total 6) > Jan 17 15:49:56 rpi3 tvheadend[238]: TS: DVB-S Network/12130H/NBR: H264 @ > #1911 Continuity counter error (total 12) > Jan 17 15:50:07 rpi3 tvheadend[238]: TS: DVB-S Network/12130H/NBR: H264 @ > #1911 Continuity counter error (total 13) > Jan 17 15:50:33 rpi3 tvheadend[238]: TS: DVB-S Network/12130H/NBR: H264 @ > #1911 Continuity counter error (total 14) > Jan 17 15:50:35 rpi3 tvheadend[238]: TS: DVB-S Network/12130H/NBR: MPEG2AUDIO > @ #1912 Continuity counter error (total 7) > Jan 17 15:50:46 rpi3 tvheadend[238]: TS: DVB-S Network/12130H/NBR: H264 @ > #1911 Continuity counter error (total 16) > Jan 17 15:50:46 rpi3 tvheadend[238]: TS: DVB-S Network/12130H/NBR: MPEG2AUDIO > @ #1912 Continuity counter error (total 8) > Jan 17 15:51:06 rpi3 tvheadend[238]: TS: DVB-S Network/12130H/NBR: H264 @ > #1911 Continuity counter error (total 17) > Jan 17 15:54:14 rpi3 tvheadend[238]: TS: DVB-S Network/12130H/NBR: H264 @ > #1911 Continuity counter error (total 18) > Jan 17 15:54:14 rpi3 tvheadend[238]: TS: DVB-S Network/12130H/NBR: MPEG2AUDIO > @ #1912 Continuity counter error (total 9) > Jan 17 15:58:05 rpi3 tvheadend[238]: TS: DVB-S Network/12130H/NBR: H264 @ > #1911 Continuity counter error (total 21) > Jan 17 15:58:05 rpi3 tvheadend[238]: TS: DVB-S Network/12130H/NBR: MPEG2AUDIO > @ #1912 Continuity counter error (total 10) > Jan 17 15:59:00 rpi3 tvheadend[238]: TS: DVB-S Network/12130H/NBR: H264 @ > #1911 Continuity counter error (total 22) > Jan 17 16:01:53 rpi3 tvheadend[238]: TS: DVB-S Network/12130H/NBR: H264 @ > #1911 Continuity counter error (total 23) > Jan 17 16:01:53 rpi3 tvheadend[238]: TS: DVB-S Network/12130H/NBR: MPEG2AUDIO > @ #1912 Continuity counter error (total 11) > Jan 17 16:02:13 rpi3 tvheadend[238]: TS: DVB-S Network/12130H/NBR: H264 @ > #1911 Continuity counter error (total 24) > Jan 17 16:02:13 rpi3 tvheadend[238]: TS: DVB-S Network/12130H/NBR: MPEG2AUDIO > @ #1912 Continuity counter error (total 12) > Jan 17 16:02:23 rpi3 tvheadend[238]: TS: DVB-S Network/12130H/NBR: H264 @ > #1911 Continuity counter error (total 25) > Jan 17 16:03:03 rpi3 tvheadend[238]: TS: DVB-S Network/12130H/NBR: H264 @ > #1911 Continuity counter error (total 26) > Jan 17 16:03:13 rpi3 tvheadend[238]: TS: DVB-S Network/12130H/NBR: H264 @ > #1911 Continuity counter error (total 28) > Jan 17 16:04:24 rpi3 tvheadend[238]: TS: DVB-S Network/12130H/NBR: H264 @ > #1911 Continuity counter error (total 29) > Jan 17 16:04:24 rpi3 tvheadend[238]: TS: DVB-S Network/12130H/NBR: MPEG2AUDIO > @ #1912 Continuity counter error (total 13) > Jan 17 16:07:42 rpi3 tvheadend[238]: TS: DVB-S Network/12130H/NBR: H264 @ > #1911 Continuity counter error (total 30) > Jan 17 16:08:52 rpi3 tvheadend[238]: TS: DVB-S Network/12130H/NBR: H264 @ > #1911 Continuity counter error (total 31) > Jan 17 16:09:20 rpi3 tvheadend[238]: TS: DVB-S Network/12130H/NBR: H264 @ > #1911 Continuity counter error (total 32) > Jan 17 16:09:21 rpi3 tvheadend[238]: TS: DVB-S Network/12130H/NBR: MPEG2AUDIO > @ #1912 Continuity counter error (total 14) > Jan 17 16:10:30 rpi3 tvheadend[238]: TS: DVB-S Network/12130H/NBR: H264 @ > #1911 Continuity counter error (total 34) > Jan 17 16:11:02 rpi3 tvheadend[238]: TS: DVB-S Network/12130H/NBR: H264 @ > #1911 Continuity counter error (total 35) > Jan 17 16:11:02 rpi3 tvheadend[238]: TS: DVB-S Network/12130H/NBR: MPEG2AUDIO > @ #1912 Continuity counter error (total 15) > Jan 17 16:13:31 rpi3 tvheadend[238]: TS: DVB-S Network/12130H/NBR: H264 @ > #1911 Continuity counter error (total 37) > Jan 17 16:14:01 rpi3 tvheadend[238]: TS: DVB-S Network/12130H/NBR: H264 @ > #1911 Continuity counter error (total 38) > Jan 17 16:14:29 rpi3 tvheadend[238]: TS: DVB-S Network/12130H/NBR: H264 @ > #1911 Continuity counter error (total 39) > Jan 17 16:18:58 rpi3 tvheadend[238]: TS: DVB-S Network/12130H/NBR: H264 @ > #1911 Continuity counter error (total 40) > Jan 17 16:18:58 rpi3 tvheadend[238]: TS: DVB-S Network/12130H/NBR: MPEG2AUDIO > @ #1912 Continuity counter error (total 16) > Jan 17 16:19:19 rpi3 tvheadend[238]: TS: DVB-S Network/12130H/NBR: H264 @ > #1911 Continuity counter error (total 41) > Jan 17 16:19:43 rpi3 tvheadend[238]: TS: DVB-S Network/12130H/NBR: H264 @ > #1911 Continuity counter error (total 42) > Jan 17 16:19:43 rpi3 tvheadend[238]: TS: DVB-S Network/12130H/NBR: MPEG2AUDIO > @ #1912 Continuity counter error (total 17) > Jan 17 16:20:19 rpi3 tvheadend[238]: TS: DVB-S Network/12130H/NBR: H264 @ > #1911 Continuity counter error (total 43) > Jan 17 16:20:19 rpi3 tvheadend[238]: TS: DVB-S Network/12130H/NBR: MPEG2AUDIO > @ #1912 Continuity counter error (total 18) > Jan 17 16:20:39 rpi3 tvheadend[238]: TS: DVB-S Network/12130H/NBR: MPEG2AUDIO > @ #1912 Continuity counter error (total 19) > Jan 17 16:21:41 rpi3 tvheadend[238]: TS: DVB-S Network/12130H/NBR: H264 @ > #1911 Continuity counter error (total 44) > Jan 17 16:22:05 rpi3 tvheadend[238]: TS: DVB-S Network/12130H/NBR: H264 @ > #1911 Continuity counter error (total 45) > Jan 17 16:22:05 rpi3 tvheadend[238]: TS: DVB-S Network/12130H/NBR: MPEG2AUDIO > @ #1912 Continuity counter error (total 20) > Jan 17 16:22:18 rpi3 tvheadend[238]: TS: DVB-S Network/12130H/NBR: H264 @ > #1911 Continuity counter error (total 46) > Jan 17 16:25:18 rpi3 tvheadend[238]: TS: DVB-S Network/12130H/NBR: H264 @ > #1911 Continuity counter error (total 47) > Jan 17 16:25:18 rpi3 tvheadend[238]: TS: DVB-S Network/12130H/NBR: MPEG2AUDIO > @ #1912 Continuity counter error (total 21) > Jan 17 16:25:58 rpi3 tvheadend[238]: TS: DVB-S Network/12130H/NBR: H264 @ > #1911 Continuity counter error (total 48) > Jan 17 16:26:14 rpi3 tvheadend[238]: TS: DVB-S Network/12130H/NBR: H264 @ > #1911 Continuity counter error (total 49) > Jan 17 16:26:14 rpi3 tvheadend[238]: TS: DVB-S Network/12130H/NBR: MPEG2AUDIO > @ #1912 Continuity counter error (total 22) > Jan 17 16:26:53 rpi3 tvheadend[238]: TS: DVB-S Network/12130H/NBR: H264 @ > #1911 Continuity counter error (total 50) > Jan 17 16:26:53 rpi3 tvheadend[238]: TS: DVB-S Network/12130H/NBR: MPEG2AUDIO > @ #1912 Continuity counter error (total 23) > Jan 17 16:27:13 rpi3 tvheadend[238]: TS: DVB-S Network/12130H/NBR: H264 @ > #1911 Continuity counter error (total 51) > Jan 17 16:28:03 rpi3 tvheadend[238]: TS: DVB-S Network/12130H/NBR: H264 @ > #1911 Continuity counter error (total 52) > Jan 17 16:28:33 rpi3 tvheadend[238]: TS: DVB-S Network/12130H/NBR: H264 @ > #1911 Continuity counter error (total 53) > Jan 17 16:28:33 rpi3 tvheadend[238]: TS: DVB-S Network/12130H/NBR: MPEG2AUDIO > @ #1912 Continuity counter error (total 24) > Jan 17 16:28:37 rpi3 kernel: [ 2918.072789] alloc_contig_range: [2a844, > 2a845) PFNs busy > Jan 17 16:28:37 rpi3 kernel: [ 2918.075609] alloc_contig_range: [2a844, > 2a845) PFNs busy > Jan 17 16:28:37 rpi3 kernel: [ 2918.078281] alloc_contig_range: [2a844, > 2a845) PFNs busy > Jan 17 16:28:37 rpi3 kernel: [ 2918.124162] alloc_contig_range: [2a844, > 2a845) PFNs busy > Jan 17 16:28:37 rpi3 kernel: alloc_contig_range: [2a844, 2a845) PFNs busy > Jan 17 16:28:37 rpi3 kernel: alloc_contig_range: [2a844, 2a845) PFNs busy > Jan 17 16:28:37 rpi3 kernel: alloc_contig_range: [2a844, 2a845) PFNs busy > Jan 17 16:28:37 rpi3 kernel: alloc_contig_range: [2a844, 2a845) PFNs busy > Jan 17 16:28:45 rpi3 tvheadend[238]: TS: DVB-S Network/12130H/NBR: H264 @ > #1911 Continuity counter error (total 55) > Jan 17 16:29:05 rpi3 tvheadend[238]: TS: DVB-S Network/12130H/NBR: H264 @ > #1911 Continuity counter error (total 56) > Jan 17 16:29:05 rpi3 tvheadend[238]: TS: DVB-S Network/12130H/NBR: MPEG2AUDIO > @ #1912 Continuity counter error (total 25) > Jan 17 16:30:15 rpi3 tvheadend[238]: TS: DVB-S Network/12130H/NBR: H264 @ > #1911 Continuity counter error (total 57) > Jan 17 16:30:31 rpi3 tvheadend[238]: TS: DVB-S Network/12130H/NBR: H264 @ > #1911 Continuity counter error (total 58) > Jan 17 16:30:31 rpi3 tvheadend[238]: TS: DVB-S Network/12130H/NBR: MPEG2AUDIO > @ #1912 Continuity counter error (total 26) > Jan 17 16:30:54 rpi3 tvheadend[238]: TS: DVB-S Network/12130H/NBR: H264 @ > #1911 Continuity counter error (total 59) > Jan 17 16:31:21 rpi3 tvheadend[238]: TS: DVB-S Network/12130H/NBR: H264 @ > #1911 Continuity counter error (total 61) > Jan 17 16:31:25 rpi3 tvheadend[238]: TS: DVB-S Network/12130H/NBR: MPEG2AUDIO > @ #1912 Continuity counter error (total 27) > Jan 17 16:32:31 rpi3 tvheadend[238]: TS: DVB-S Network/12130H/NBR: H264 @ > #1911 Continuity counter error (total 63) > Jan 17 16:32:31 rpi3 tvheadend[238]: TS: DVB-S Network/12130H/NBR: MPEG2AUDIO > @ #1912 Continuity counter error (total 28) > Jan 17 16:35:44 rpi3 tvheadend[238]: TS: DVB-S Network/12130H/NBR: H264 @ > #1911 Continuity counter error (total 64) > Jan 17 16:37:00 rpi3 tvheadend[238]: TS: DVB-S Network/12130H/NBR: H264 @ > #1911 Continuity counter error (total 65) > Jan 17 16:37:00 rpi3 tvheadend[238]: TS: DVB-S Network/12130H/NBR: MPEG2AUDIO > @ #1912 Continuity counter error (total 29) > Jan 17 16:37:13 rpi3 tvheadend[238]: TS: DVB-S Network/12130H/NBR: H264 @ > #1911 Continuity counter error (total 67) > Jan 17 16:37:13 rpi3 tvheadend[238]: TS: DVB-S Network/12130H/NBR: MPEG2AUDIO > @ #1912 Continuity counter error (total 30) > Jan 17 16:37:49 rpi3 tvheadend[238]: TS: DVB-S Network/12130H/NBR: H264 @ > #1911 Continuity counter error (total 68) > Jan 17 16:38:09 rpi3 tvheadend[238]: TS: DVB-S Network/12130H/NBR: H264 @ > #1911 Continuity counter error (total 69) > Jan 17 16:38:39 rpi3 tvheadend[238]: TS: DVB-S Network/12130H/NBR: H264 @ > #1911 Continuity counter error (total 70) > Jan 17 16:39:09 rpi3 tvheadend[238]: TS: DVB-S Network/12130H/NBR: H264 @ > #1911 Continuity counter error (total 71) > Jan 17 16:39:09 rpi3 tvheadend[238]: TS: DVB-S Network/12130H/NBR: MPEG2AUDIO > @ #1912 Continuity counter error (total 31) > Jan 17 16:39:44 rpi3 tvheadend[238]: TS: DVB-S Network/12130H/NBR: H264 @ > #1911 Continuity counter error (total 72) > Jan 17 16:39:44 rpi3 tvheadend[238]: TS: DVB-S Network/12130H/NBR: MPEG2AUDIO > @ #1912 Continuity counter error (total 32) > Jan 17 16:40:06 rpi3 tvheadend[238]: TS: DVB-S Network/12130H/NBR: H264 @ > #1911 Continuity counter error (total 73) > Jan 17 16:40:06 rpi3 tvheadend[238]: TS: DVB-S Network/12130H/NBR: MPEG2AUDIO > @ #1912 Continuity counter error (total 33) > Jan 17 16:40:48 rpi3 tvheadend[238]: TS: DVB-S Network/12130H/NBR: H264 @ > #1911 Continuity counter error (total 77) > Jan 17 16:40:48 rpi3 tvheadend[238]: TS: DVB-S Network/12130H/NBR: MPEG2AUDIO > @ #1912 Continuity counter error (total 35) > Jan 17 16:41:28 rpi3 tvheadend[238]: TS: DVB-S Network/12130H/NBR: H264 @ > #1911 Continuity counter error (total 78) > Jan 17 16:41:58 rpi3 tvheadend[238]: TS: DVB-S Network/12130H/NBR: H264 @ > #1911 Continuity counter error (total 79) > Jan 17 16:41:58 rpi3 tvheadend[238]: TS: DVB-S Network/12130H/NBR: MPEG2AUDIO > @ #1912 Continuity counter error (total 36) > Jan 17 16:42:17 rpi3 tvheadend[238]: TS: DVB-S Network/12130H/NBR: H264 @ > #1911 Continuity counter error (total 80) > Jan 17 16:42:29 rpi3 tvheadend[238]: TS: DVB-S Network/12130H/NBR: H264 @ > #1911 Continuity counter error (total 81) > Jan 17 16:42:29 rpi3 tvheadend[238]: TS: DVB-S Network/12130H/NBR: MPEG2AUDIO > @ #1912 Continuity counter error (total 37) > Jan 17 16:42:47 rpi3 tvheadend[238]: TS: DVB-S Network/12130H/NBR: H264 @ > #1911 Continuity counter error (total 83) > Jan 17 16:42:47 rpi3 tvheadend[238]: TS: DVB-S Network/12130H/NBR: MPEG2AUDIO > @ #1912 Continuity counter error (total 38) > Jan 17 16:43:26 rpi3 tvheadend[238]: TS: DVB-S Network/12130H/NBR: H264 @ > #1911 Continuity counter error (total 84) > Jan 17 16:44:46 rpi3 tvheadend[238]: TS: DVB-S Network/12130H/NBR: H264 @ > #1911 Continuity counter error (total 85) > Jan 17 16:44:46 rpi3 tvheadend[238]: TS: DVB-S Network/12130H/NBR: MPEG2AUDIO > @ #1912 Continuity counter error (total 39) > Jan 17 16:45:10 rpi3 tvheadend[238]: TS: DVB-S Network/12130H/NBR: H264 @ > #1911 Continuity counter error (total 86) > Jan 17 16:45:10 rpi3 tvheadend[238]: TS: DVB-S Network/12130H/NBR: MPEG2AUDIO > @ #1912 Continuity counter error (total 40) > Jan 17 16:46:45 rpi3 tvheadend[238]: TS: DVB-S Network/12130H/NBR: H264 @ > #1911 Continuity counter error (total 88) > Jan 17 16:47:32 rpi3 tvheadend[238]: TS: DVB-S Network/12130H/NBR: H264 @ > #1911 Continuity counter error (total 89) > Jan 17 16:47:32 rpi3 tvheadend[238]: TS: DVB-S Network/12130H/NBR: MPEG2AUDIO > @ #1912 Continuity counter error (total 41) > Jan 17 16:48:17 rpi3 tvheadend[238]: TS: DVB-S Network/12130H/NBR: H264 @ > #1911 Continuity counter error (total 90) > Jan 17 16:48:17 rpi3 tvheadend[238]: TS: DVB-S Network/12130H/NBR: MPEG2AUDIO > @ #1912 Continuity counter error (total 42) > Jan 17 16:48:53 rpi3 tvheadend[238]: TS: DVB-S Network/12130H/NBR: H264 @ > #1911 Continuity counter error (total 92) > Jan 17 16:49:23 rpi3 tvheadend[238]: TS: DVB-S Network/12130H/NBR: H264 @ > #1911 Continuity counter error (total 93) > Jan 17 16:50:03 rpi3 tvheadend[238]: TS: DVB-S Network/12130H/NBR: H264 @ > #1911 Continuity counter error (total 94) > Jan 17 16:50:03 rpi3 tvheadend[238]: TS: DVB-S Network/12130H/NBR: MPEG2AUDIO > @ #1912 Continuity counter error (total 43) > > From this test, it is clear that tvheadend is losing data from the TV > capture USB stick. On the tests I ran before, either reverting changeset > > https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=4cd13c21b207e80ddb1144c576500098f2d5f882 > or applying this fixup: > > https://git.linuxtv.org/mchehab/experimental.git/commit/?h=softirq_fixup&id=7996c39af87d329f64e6b1b2af120d6ce11ede29 > > it got better results. > > I intend to do further tests on it. Do you have some procedure to better > test it?
I see, so you may want to test (possibly much) higher values of MAX_SOFTIRQ_RESTART, such as 50 or 100. We are now setting call limits per jiffy frame. Perhaps I should still keep limits per do_softirq() calls as well and couple both. Thanks for testing this! > > Thanks, > Mauro > >

