From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751676AbdE3NmY (ORCPT ); Tue, 30 May 2017 09:42:24 -0400 Received: from www.llwyncelyn.cymru ([82.70.14.225]:52072 "EHLO fuzix.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750890AbdE3NmX (ORCPT ); Tue, 30 May 2017 09:42:23 -0400 Date: Tue, 30 May 2017 14:42:13 +0100 From: Alan Cox To: Rob Herring Cc: Andrey Smirnov , "linux-serial@vger.kernel.org" , Chris Healy , Peter Senna Tschudin , Greg Kroah-Hartman , Jiri Slaby , "linux-kernel@vger.kernel.org" Subject: Re: [RFC, PATCH] imx: serial: Take tty->files_lock opportunistically Message-ID: <20170530144213.48df2a1c@alans-desktop> In-Reply-To: References: <20170530123726.18598-1-andrew.smirnov@gmail.com> Organization: Intel Corporation X-Mailer: Claws Mail 3.14.1 (GTK+ 2.24.31; x86_64-redhat-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org > > Fixes: 18a4208826dd0a13eb06de724c86bba2c225f943 ("imx-serial: Reduce > > RX DMA startup latency when opening for reading") > > > > Cc: cphealy@gmail.com > > Cc: Peter Senna Tschudin > > Cc: Greg Kroah-Hartman > > Cc: Jiri Slaby > > Cc: linux-kernel@vger.kernel.org > > Signed-off-by: Andrey Smirnov > > --- > > > > Not sure if this is the best way to solve the problem (hence the RFC > > tag). If anyone has a better idea, or if there's a better fix for this > > already, please let me know. > > IMO, the low level serial drivers shouldn't be accessing > tty->tty_files in the first place. Is being opened for write-only that > common and is skipping the DMA setup really necessary? Seconded - the Reduce RX DMA startup latency patch should just be reverted (and shouldn't ever IMHO have gotten in). Not all readers and writers to a tty have a file handle any more anyway, so it's not only icky and layer violating it's fundamentally broken beyond the locking. Alan