public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
To: Nicolas Pitre <nicolas.pitre@linaro.org>
Cc: Jiri Slaby <jslaby@suse.com>,
	Russell King <linux@armlinux.org.uk>,
	linux-kernel@vger.kernel.org,
	linux-arm-kernel@lists.infradead.org
Subject: Re: [PATCH 0/3] minitty: a minimal TTY layer alternative for embedded systems
Date: Fri, 24 Mar 2017 14:53:17 +0100	[thread overview]
Message-ID: <20170324135317.GA26769@kroah.com> (raw)
In-Reply-To: <alpine.LFD.2.20.1703240819370.2304@knanqh.ubzr>

On Fri, Mar 24, 2017 at 08:31:45AM -0400, Nicolas Pitre wrote:
> On Fri, 24 Mar 2017, Greg Kroah-Hartman wrote:
> 
> > meta-comment, any reason you didn't cc: linux-serial@vger as well?
> 
> I didn't realize such a list even existed. I looked up "TTY LAYER" in 
> the maintainer file.

Ah, didn't notice the list wasn't included there, I'll go fix that...

> > Again, I like the idea, but worry that with this change, we would have
> > two different tty layers we have to maintain for the next 20+ years, and
> > we have a hard time keeping one stable and working today :)
> 
> That's the crux of the argument: touching the current TTY layer is NOT 
> going to help keeping it stable. Here, not only I did remove features, 
> but the ones I kept were reimplemented to be much smaller and 
> potentially less scalable and performant too.  The ultimate goal here is 
> to have the smallest code possible with very simple locking and not 
> necessarily the most scalable code. That in itself is contradictory with 
> the regular TTY code and warrants a separate implementation. And because 
> it is so small, it is much easier to understand and much easier to 
> maintain.

So, what you are really saying here is "the current tty layer is too
messy, too complex, too big, and not understandable, so I'm going to
route around it by rewriting the whole thing just for my single-use-case
because I don't want to touch it."

That's a horrid thing to do.

Factoring things out is great.  Routing around the existing working code
just because you want something "simpler" is not great.  Refactor and
fix things up so you do understand it, because by ignoring it, you are
going to end up making the same mistakes that have already been fixed
with the existing 20+ years of tty layer development.

So please, take what we have, refactor, and carve things up so that the
_same_ code paths are being used for both "big and little" tty layers.
That way _everyone_ benifits, no need to have totally separate code
paths, and totally different files that different people maintain.

> Where code sharing made sense, I did factor out common parts already, 
> such as the baudrate handling. I intend to do the same to add job 
> control support.

The first two patches were great, I like those.  Keep that work up, just
make it so that a single line disipline attached to a serial port,
without the pty stuff, works just fine and is tiny.  I don't see why
that can't be possible.

thanks,

greg k-h

  reply	other threads:[~2017-03-24 13:53 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-03-23 21:03 [PATCH 0/3] minitty: a minimal TTY layer alternative for embedded systems Nicolas Pitre
2017-03-23 21:03 ` [PATCH 1/3] console: move console_init() out of tty_io.c Nicolas Pitre
2017-03-23 21:03 ` [PATCH 2/3] tty: move baudrate handling code to a file of its own Nicolas Pitre
2017-03-23 21:03 ` [PATCH 3/3] minitty: minimal TTY support replacement for serial ports Nicolas Pitre
2017-03-24  3:50 ` [PATCH 0/3] minitty: a minimal TTY layer alternative for embedded systems Baruch Siach
2017-03-24 12:18   ` Nicolas Pitre
2017-03-24  6:50 ` Greg Kroah-Hartman
2017-03-24 12:31   ` Nicolas Pitre
2017-03-24 13:53     ` Greg Kroah-Hartman [this message]
2017-03-24 17:49       ` Nicolas Pitre
2017-03-24 20:46       ` Ard Biesheuvel

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20170324135317.GA26769@kroah.com \
    --to=gregkh@linuxfoundation.org \
    --cc=jslaby@suse.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux@armlinux.org.uk \
    --cc=nicolas.pitre@linaro.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox