Received: by 10.223.148.5 with SMTP id 5csp6157663wrq; Wed, 17 Jan 2018 10:08:41 -0800 (PST) X-Google-Smtp-Source: ACJfBosUr/BHGWGcLHb/NCLCtjkqCW114KY/juobqmBtmbOZE4/2qKNFIb6Kzte6riE61i6lKgDN X-Received: by 10.99.43.86 with SMTP id r83mr34920566pgr.141.1516212521001; Wed, 17 Jan 2018 10:08:41 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1516212520; cv=none; d=google.com; s=arc-20160816; b=mO5+OMabjc2oSol54DwztGngaSjoaKILWl1eScAKw47hCVUuZogms5I8d4FgEWsz5W V2AlprXq0RChG0mNoRVnQcmzOcjkHr6vrRix8+CZV6OGKiAretFcqLIaTtivDK6A1qMz SerlXhCCmRZNSr/LggevpTgjBulpL3kPQS2MMP+mlh7TwoJZThkLFEtceqMI0taVF57M JAOFsefyDahlG9ozB5XmkfYhUcHGb1oOn1nP88eUyPkWIjwMslm2ICfWDgbRvrl/4oDP NnCXRSFcBQS9i1lPnDW5kwhroJwwrRNeETG0n3FNAbRiklwZFvEpbVSW74BeF/yHqM1a PDfg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dmarc-filter:arc-authentication-results; bh=Fi+UeQuJNruGWAYSGCs8wUR/99LxM6oVgwCH27rikIY=; b=loS6vFVztvJSqd7TFzDO5xAkNGfCJA3Jf4fmhOpo3mUZVegRsEPPg1cR5yW5PuAMVc 0hZrkppDO1/6Xi/TR2S9QRwsUJmaLV1NKQ/yN8+cVBsxV4Q9QLLO6ClLBow5P9x2m9YA i64sxGpLnC0Gc7uTgVnHEy+IoFcMZxipKrhSYFeMIv6BN+AkWEeqEuLSsP1KB2BZu4Ek m9qCehWavevbDszy/bH6XCJleGcwSq/sTbzyDsBeeqWkEIPDnJipDSta86XAJliD7GDI GQ81D9kThLCz781aOYhMpcuM4ILss9kvFaTIQcNd/Wl7BT7M+4B7ubGiit+5+c4mPrB+ pMNQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id k78si4731813pfk.142.2018.01.17.10.08.26; Wed, 17 Jan 2018 10:08:40 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753795AbeAQSHV (ORCPT + 99 others); Wed, 17 Jan 2018 13:07:21 -0500 Received: from mail.kernel.org ([198.145.29.99]:53802 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752689AbeAQSHU (ORCPT ); Wed, 17 Jan 2018 13:07:20 -0500 Received: from localhost (i16-les03-th2-31-37-47-191.sfr.lns.abo.bbox.fr [31.37.47.191]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 72C9D2175C; Wed, 17 Jan 2018 18:07:18 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 72C9D2175C Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=kernel.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=frederic@kernel.org Date: Wed, 17 Jan 2018 19:07:15 +0100 From: Frederic Weisbecker To: Mauro Carvalho Chehab Cc: LKML , Levin Alexander , Peter Zijlstra , Linus Torvalds , Hannes Frederic Sowa , "Paul E . McKenney" , Wanpeng Li , Dmitry Safonov , Thomas Gleixner , Eric Dumazet , Radu Rendec , Ingo Molnar , Stanislaw Gruszka , Paolo Abeni , Rik van Riel , Andrew Morton , David Miller Subject: Re: [RFC PATCH 0/5] softirq: Per vector threading v2 Message-ID: <20180117180713.GA17735@lerouge> References: <1516077640-19718-1-git-send-email-frederic@kernel.org> <20180117145620.213cb5ad@vento.lan> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20180117145620.213cb5ad@vento.lan> User-Agent: Mutt/1.5.24 (2015-08-30) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 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 > >