linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 00/21] TTY buffer in tty_port and other stuff
@ 2012-10-18 20:26 Jiri Slaby
  2012-10-18 20:26 ` [PATCH 01/21] TTY: devpts, don't care about TTY in devpts_get_tty Jiri Slaby
                   ` (23 more replies)
  0 siblings, 24 replies; 47+ messages in thread
From: Jiri Slaby @ 2012-10-18 20:26 UTC (permalink / raw)
  To: gregkh; +Cc: alan, linux-kernel, jirislaby

Hi,

this is the fifth series of patches which finally move tty buffers
from tty_struct (present from open to close/hangup) to tty_port
(present as long as the device). This allows us to get rid of the tty
refcounting in the interrupt service routines and other hot paths
after we are done. This is because we do not need to handle races
among ISRs, timers, hangups and others, because tty_port lives as long
as an interrupt/timer tick may occur. Unlike tty_struct.

This set also cleans up devpts handling a bit. Devpts used to play
with tty->driver_data which was a bit ugly. Now devpts returns a node
which we store to driver_data and pass it back when we need devpts to
kill that. As a result, we can do that in the pty code instead of an
ugly hook in tty_release.

Finally, the set moves all the n_tty private stuff from tty_struct to
its own (internal) structure. This was an intention last time ago (at
least here), but the races and undefined ldisc->open/close behavior
did not allow us to do that. Now that we have ldisc kills and waits
and bells and whistles we could finally go ahead.

As usual, standard x86 stuff was runtime-tested. The rest is only
checked to be compilation-errors free.

Jiri Slaby (21):
  TTY: devpts, don't care about TTY in devpts_get_tty
  TTY: devpts, return created inode from devpts_pty_new
  TTY: devpts, do not set driver_data
  TTY: devpts, document devpts inode operations
  TTY: move devpts kill to pty
  TTY: vt, fix paste_selection ldisc handling
  TTY: ldisc, wait for idle ldisc in release
  TTY: hci_ldisc, remove invalid check in open
  TTY: n_tty, simplify read_buf+echo_buf allocation
  TTY: n_tty, remove bogus checks
  TTY: audit, stop accessing tty->icount
  TTY: n_tty, add ldisc data to n_tty
  TTY: move ldisc data from tty_struct: simple members
  TTY: move ldisc data from tty_struct: bitmaps
  TTY: move ldisc data from tty_struct: read_* and echo_* and canon_*
    stuff
  TTY: move ldisc data from tty_struct: locks
  TTY: n_tty, propagate n_tty_data
  TTY: move TTY_FLUSH* flags to tty_port
  TTY: tty_buffer, cache pointer to tty->buf
  TTY: add port -> tty link
  TTY: move tty buffers to tty_port

 drivers/bluetooth/hci_ldisc.c |   7 +-
 drivers/tty/n_tty.c           | 752 ++++++++++++++++++++++--------------------
 drivers/tty/pty.c             |  30 +-
 drivers/tty/tty_audit.c       |  15 +-
 drivers/tty/tty_buffer.c      | 224 +++++++------
 drivers/tty/tty_io.c          |  15 +-
 drivers/tty/tty_ldisc.c       |  15 +-
 drivers/tty/tty_port.c        |   2 +
 drivers/tty/vt/selection.c    |   9 +-
 fs/devpts/inode.c             |  61 ++--
 include/linux/devpts_fs.h     |  20 +-
 include/linux/tty.h           |  44 +--
 include/linux/tty_flip.h      |   2 +-
 13 files changed, 633 insertions(+), 563 deletions(-)

-- 
1.7.12.3



^ permalink raw reply	[flat|nested] 47+ messages in thread

end of thread, other threads:[~2012-12-04 19:21 UTC | newest]

Thread overview: 47+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-10-18 20:26 [PATCH 00/21] TTY buffer in tty_port and other stuff Jiri Slaby
2012-10-18 20:26 ` [PATCH 01/21] TTY: devpts, don't care about TTY in devpts_get_tty Jiri Slaby
2012-10-18 20:26 ` [PATCH 02/21] TTY: devpts, return created inode from devpts_pty_new Jiri Slaby
2012-10-18 20:26 ` [PATCH 03/21] TTY: devpts, do not set driver_data Jiri Slaby
2012-10-18 20:26 ` [PATCH 04/21] TTY: devpts, document devpts inode operations Jiri Slaby
2012-10-18 20:26 ` [PATCH 05/21] TTY: move devpts kill to pty Jiri Slaby
2012-10-18 20:26 ` [PATCH 06/21] TTY: vt, fix paste_selection ldisc handling Jiri Slaby
2012-10-18 20:26 ` [PATCH 07/21] TTY: ldisc, wait for idle ldisc in release Jiri Slaby
2012-10-18 20:26 ` [PATCH 08/21] TTY: hci_ldisc, remove invalid check in open Jiri Slaby
2012-10-18 20:47   ` Marcel Holtmann
2012-10-18 20:26 ` [PATCH 09/21] TTY: n_tty, simplify read_buf+echo_buf allocation Jiri Slaby
2012-10-18 20:26 ` [PATCH 10/21] TTY: n_tty, remove bogus checks Jiri Slaby
2012-10-18 20:26 ` [PATCH 11/21] TTY: audit, stop accessing tty->icount Jiri Slaby
2012-10-18 20:26 ` [PATCH 12/21] TTY: n_tty, add ldisc data to n_tty Jiri Slaby
2012-10-18 20:26 ` [PATCH 13/21] TTY: move ldisc data from tty_struct: simple members Jiri Slaby
2012-10-18 20:26 ` [PATCH 14/21] TTY: move ldisc data from tty_struct: bitmaps Jiri Slaby
2012-10-18 20:26 ` [PATCH 15/21] TTY: move ldisc data from tty_struct: read_* and echo_* and canon_* stuff Jiri Slaby
2012-10-18 20:26 ` [PATCH 16/21] TTY: move ldisc data from tty_struct: locks Jiri Slaby
2012-10-18 20:26 ` [PATCH 17/21] TTY: n_tty, propagate n_tty_data Jiri Slaby
2012-10-18 20:26 ` [PATCH 18/21] TTY: move TTY_FLUSH* flags to tty_port Jiri Slaby
2012-10-18 20:26 ` [PATCH 19/21] TTY: tty_buffer, cache pointer to tty->buf Jiri Slaby
2012-10-18 20:26 ` [PATCH 20/21] TTY: add port -> tty link Jiri Slaby
2012-10-18 20:26 ` [PATCH 21/21] TTY: move tty buffers to tty_port Jiri Slaby
2012-10-25 18:02   ` Sasha Levin
2012-10-25 18:08     ` Greg KH
2012-10-31 12:53     ` Jiri Slaby
2012-10-31 15:30       ` Sasha Levin
2012-10-31 15:32         ` Jiri Slaby
2012-10-31 15:59           ` Sasha Levin
2012-11-02 15:51             ` Jiri Slaby
2012-11-02 16:07               ` Sasha Levin
2012-11-02 16:18                 ` Jiri Slaby
2012-11-02 16:23                   ` Sasha Levin
2012-11-03  2:03                   ` Sasha Levin
2012-11-03 15:55                     ` Jiri Slaby
2012-11-03 23:06                       ` Sasha Levin
2012-11-04  0:53                         ` Sasha Levin
2012-11-27 19:57                           ` Peter Hurley
2012-11-30 23:52                             ` Sasha Levin
2012-12-01 14:59                               ` flush_to_ldisc accesses tty after free (was: [PATCH 21/21] TTY: move tty buffers to tty_port) Peter Hurley
2012-12-01 20:06                                 ` Peter Hurley
2012-12-02 19:57                                   ` Peter Hurley
2012-12-04 19:21                                 ` Ilya Zykov
2012-10-31 20:10           ` [PATCH 21/21] TTY: move tty buffers to tty_port Sasha Levin
2012-10-18 21:12 ` [PATCH 00/21] TTY buffer in tty_port and other stuff Greg KH
2012-10-22 14:57 ` Alan Cox
2012-10-22 23:59 ` Greg KH

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).