From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail.linuxfoundation.org ([140.211.169.12]:35188 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751606AbdAYPGp (ORCPT ); Wed, 25 Jan 2017 10:06:45 -0500 Date: Wed, 25 Jan 2017 16:06:47 +0100 From: Greg Kroah-Hartman To: Johan Hovold Cc: linux-usb@vger.kernel.org, Antoine Aubert , stable@vger.kernel.org Subject: Re: [PATCH] USB: serial: ftdi_sio: fix extreme low-latency setting Message-ID: <20170125150647.GB16839@kroah.com> References: <20170125143520.10982-1-johan@kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20170125143520.10982-1-johan@kernel.org> Sender: stable-owner@vger.kernel.org List-ID: On Wed, Jan 25, 2017 at 03:35:20PM +0100, Johan Hovold wrote: > Since commit 557aaa7ffab6 ("ft232: support the ASYNC_LOW_LATENCY > flag") the FTDI driver has been using a receive latency-timer value of > 1 ms instead of the device default of 16 ms. > > The latency timer is used to periodically empty a non-full receive > buffer, but a status header is always sent when the timer expires > including when the buffer is empty. This means that a two-byte bulk > message is received every millisecond also for an otherwise idle port as > long as it is open. > > Let's restore the pre-2009 behaviour which reduces rate of status > messages to 1/16th (e.g. interrupt frequency drops from 1 kHz to 62.5 > Hz) by not setting ASYNC_LOW_LATENCY by default. > > Anyone willing to pay the price for the minimum-latency behaviour should > set the flag explicitly instead using the TIOCSSERIAL ioctl or a tool > such as setserial (e.g. setserial /dev/ttyUSB0 low_latency). > > Note that since commit 0cbd81a9f6ba ("USB: ftdi_sio: remove > tty->low_latency") the ASYNC_LOW_LATENCY flag has no other effects but > to set a minimal latency timer. > > Reported-by: Antoine Aubert > Fixes: 557aaa7ffab6 ("ft232: support the ASYNC_LOW_LATENCY flag") > Cc: stable # v2.6.31 > Signed-off-by: Johan Hovold > --- > > Greg, > > I've been aware of this overhead for a while, but never realised it was > actually a regression introduced in 2009. > > Fixing something like this after such a long time obviously means > risking a regression for anyone who is now relying on the new default > behaviour instead. I still think it's reasonable in this case to restore > the earlier behaviour given the penalty everyone else is paying for a > minimal-latency behaviour that they likely do not need or want. > > Whether this should go to stable is a different question. Perhaps the > stable tag is not warranted, and this should just be the default > behaviour going forward? What do you think? I think the stable tag is warrented here. Do you want me to take this patch now into my usb-linus tree, or will you include it in a pull request? thanks, greg k-h