Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1653243

Re: [RFC, PATCH] imx: serial: Take tty->files_lock opportunistically

From Alan Cox <gnomes@lxorguk.ukuu.org.uk>
Newsgroups linux.kernel
Subject Re: [RFC, PATCH] imx: serial: Take tty->files_lock opportunistically
Date 2017-05-30 15:50 +0200
Message-ID <tMPH3-82d-3@gated-at.bofh.it> (permalink)
References <tMOBj-7lm-3@gated-at.bofh.it> <tMOUG-7tv-25@gated-at.bofh.it>
Organization Intel Corporation

Show all headers | View raw


> > Fixes: 18a4208826dd0a13eb06de724c86bba2c225f943 ("imx-serial: Reduce
> > RX DMA startup latency when opening for reading")
> >
> > Cc: cphealy@gmail.com
> > Cc: Peter Senna Tschudin <peter.senna@collabora.com>
> > Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
> > Cc: Jiri Slaby <jslaby@suse.com>
> > Cc: linux-kernel@vger.kernel.org
> > Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com>
> > ---
> >
> > 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

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

[RFC, PATCH] imx: serial: Take tty->files_lock opportunistically Andrey Smirnov <andrew.smirnov@gmail.com> - 2017-05-30 14:40 +0200
  Re: [RFC, PATCH] imx: serial: Take tty->files_lock opportunistically Rob Herring <robherring2@gmail.com> - 2017-05-30 15:00 +0200
    Re: [RFC, PATCH] imx: serial: Take tty->files_lock  opportunistically Alan Cox <gnomes@lxorguk.ukuu.org.uk> - 2017-05-30 15:50 +0200
      Re: [RFC, PATCH] imx: serial: Take tty->files_lock opportunistically Peter Senna Tschudin <peter.senna@collabora.com> - 2017-05-30 15:50 +0200
        Re: [RFC, PATCH] imx: serial: Take tty->files_lock opportunistically Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2017-06-03 16:20 +0200

csiph-web