Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1757435AbeAHVbw (ORCPT + 1 other); Mon, 8 Jan 2018 16:31:52 -0500 Received: from mx1.redhat.com ([209.132.183.28]:56084 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755097AbeAHVbt (ORCPT ); Mon, 8 Jan 2018 16:31:49 -0500 Date: Mon, 8 Jan 2018 22:31:09 +0100 From: Jesper Dangaard Brouer To: "Josef Griebichler" Cc: "Mauro Carvalho Chehab" , "Alan Stern" , "Greg Kroah-Hartman" , linux-usb@vger.kernel.org, "Eric Dumazet" , "Rik van Riel" , "Paolo Abeni" , "Hannes Frederic Sowa" , linux-kernel , netdev , "Jonathan Corbet" , LMML , "Peter Zijlstra" , "David Miller" , torvalds@linux-foundation.org Subject: Re: dvb usb issues since kernel 4.9 Message-ID: <20180108223109.66c91554@redhat.com> In-Reply-To: References: <20180107090336.03826df2@vento.lan> <20180108074324.3c153189@vento.lan> Organization: Red Hat Inc. MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.39]); Mon, 08 Jan 2018 21:31:49 +0000 (UTC) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Return-Path: On Mon, 8 Jan 2018 17:26:10 +0100 "Josef Griebichler" wrote: > I tried your mentioned patch but unfortunately no real improvement for me. > dmesg http://ix.io/DOg > tvheadend service log http://ix.io/DOi > > Errors during recording are still there. Are you _also_ recording the stream on the Raspberry Pi? It seems to me, that you are expecting too much from this small device. > Errors increase if there is additional tcp load on raspberry. I did expected the issue to get worse, when you load the Pi with network traffic, as now the softirq time-budget have to be shared between networking and USB/DVB. Thus, I guess you are running TCP and USB/mpeg2ts on the same CPU (why when you have 4 CPUs?...) If you expect/want to get stable performance out of such a small box, then you (or LibreELEC) need to tune the box for this usage. And it does not have to be that complicated. First step is to move IRQ handling for the NIC to another CPU and than the USB port handling the DVB signal (/proc/irq/*/smp_affinity_list). And then pin the userspace process (taskset) to another CPU than the one handling USB-softirq. > Unfortunately there's no usbmon or tshark on libreelec so I can't > provide further logs. Do you have perf or trace-cmd on the box? Maybe we could come up with some kernel functions to trace, to measure/show the latency spikes? -- Best regards, Jesper Dangaard Brouer MSc.CS, Principal Kernel Engineer at Red Hat LinkedIn: http://www.linkedin.com/in/brouer