From mboxrd@z Thu Jan 1 00:00:00 1970 From: Peter Hurley Subject: Re: [PATCH 3/4] tty: omap-serial: use threaded interrupt handler Date: Wed, 17 Sep 2014 08:01:08 -0400 Message-ID: <54197804.3020302@hurleysoftware.com> References: <1410789610-23059-1-git-send-email-frans.klaver@xsens.com> <1410789610-23059-4-git-send-email-frans.klaver@xsens.com> <54170823.7040801@hurleysoftware.com> <5417228C.5070503@hurleysoftware.com> <20140916085037.GI28458@ci00147.xsens-tech.local> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <20140916085037.GI28458@ci00147.xsens-tech.local> Sender: linux-serial-owner@vger.kernel.org To: Frans Klaver Cc: Tony Lindgren , Felipe Balbi , Rob Herring , Pawel Moll , Mark Rutland , Ian Campbell , Kumar Gala , Greg Kroah-Hartman , Alexey Pelykh , Jiri Slaby , linux-serial@vger.kernel.org, linux-omap@vger.kernel.org, devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org List-Id: devicetree@vger.kernel.org On 09/16/2014 04:50 AM, Frans Klaver wrote: > On Mon, Sep 15, 2014 at 01:31:56PM -0400, Peter Hurley wrote: >> On 09/15/2014 11:39 AM, Peter Hurley wrote: >>> On 09/15/2014 10:00 AM, Frans Klaver wrote: >>>> At 3.6Mbaud, with slightly over 2Mbit/s data coming in, we see 1600 uart >>>> rx buffer overflows within 30 seconds. Threading the interrupt handling reduces >>>> this to about 170 overflows in 10 minutes. >>> >>> Why is the threadirqs kernel boot option not sufficient? >>> Or conversely, shouldn't this be selectable? >> > > I wasn't aware of the threadirqs boot option. I also wouldn't know if > this should be selectable. What would be a reason to favor the > non-threaded irq over the threaded irq? Not everyone cares enough about serial to dedicate kthreads to it :) >> Also, do you see the same performance differential when you implement this >> in the 8250 driver (that is, on top of Sebastian's omap->8250 conversion)? >> > > I haven't gotten Sebastian's driver to work properly yet on the console. > There was no reason for me yet to throw my omap changes on top of > Sebastian's queue. > >>> PS - To overflow the 64 byte RX FIFO at those data rates means interrupt >>> latency in excess of 250us? > > At 3686400 baud it should take about 174 us to fill a 64 byte buffer. I > haven't done any measurements on the interrupt latency though. If you > consider that we're sending about 1kB of data, 240 times a second, we're > spending a lot of time reading data from the uart. I can imagine the > system has other work to do as well. System work should not keep irqs from being serviced. Even 174us is a long time not to service an interrupt. Maybe console writes are keeping the isr from running? Regards, Peter Hurley