Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753033AbbHERgk (ORCPT ); Wed, 5 Aug 2015 13:36:40 -0400 Received: from mail-qg0-f42.google.com ([209.85.192.42]:36420 "EHLO mail-qg0-f42.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752055AbbHERgi (ORCPT ); Wed, 5 Aug 2015 13:36:38 -0400 Message-ID: <55C249A3.6030809@hurleysoftware.com> Date: Wed, 05 Aug 2015 13:36:35 -0400 From: Peter Hurley User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.8.0 MIME-Version: 1.0 To: Sven Brauch CC: Oliver Neukum , Johan Hovold , Linux Kernel Mailing List , One Thousand Gnomes , Toby Gray , linux-usb@vger.kernel.org, linux-serial@vger.kernel.org Subject: Re: [PATCH] Fix data loss in cdc-acm References: <55AC1883.4050605@svenbrauch.de> <20150720172546.GF20628@localhost> <55AD38E5.1090807@svenbrauch.de> <1437486195.3823.13.camel@suse.com> <55AEBD06.6020402@svenbrauch.de> <55AED708.903@hurleysoftware.com> <55AEE805.9050204@svenbrauch.de> <55B01554.90201@hurleysoftware.com> <55B01EDE.3050503@svenbrauch.de> In-Reply-To: <55B01EDE.3050503@svenbrauch.de> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1576 Lines: 41 On 07/22/2015 06:53 PM, Sven Brauch wrote: > Hi, > > On 23/07/15 00:12, Peter Hurley wrote: >> The premature unthrottle actually leads to the data loss but the throttling >> with a mere 2K left is _way too late_. > Ok, yes, I think so too. > >> 10ms is a _really_ long time for a cpu not to attend to a kworker. I haven't forgotten about this problem and I still plan to look into why the long delay, particularly focusing on the scheduling latency from tty_flip_buffer_push() => flush_to_ldisc(). Regards, Peter Hurley >> Which raises 2 questions: >> 1. What are the termios settings of the tty receiving input? Is it 'raw' >> mode or typical terminal mode (icanon, echo, etc.) or something else? > In my test code, I open the tty like > fd = open("/dev/ttyACM0", O_RDWR | O_NOCTTY | O_NONBLOCK); > I don't make any other changes to the default settings. To be honest, > I'm not sure in which mode it is operating then (I was assuming raw, but > I might be wrong?). > >> 2. Are there RT threads that are hogging cpu time? > I can't see any, I think the only thing which occasionally goes to RT is > pulseaudio (but during at least some of the tests I wasn't even playing > audio, so that sounds very unplausible to me). I also cannot see a > correlation between failure rate and CPU load. > > Best regards, > Sven > -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/