Skip to content

BKL conversion in tty layer

Arnd Bergmann lkml 3 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v3 Latest10 patches 16 repliesIn review
  2. v213 patches 11 repliesSuperseded
  3. v1 RFC9 patches 11 repliesSuperseded

Patches in v3 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/10tty: replace BKL with a new tty_lockdrivers/char/amiserial.c drivers/char/briq_panel.c drivers/char/n_hdlc.c +14 more+157 -1140 replies
2/10tty: never hold BTM while getting tty_mutexdrivers/char/pty.c drivers/char/tty_io.c+15 -200 replies
3/10tty: fix console_sem lock orderdrivers/video/console/vgacon.c+0 -20 replies
4/10cdc-acm: remove dead codedrivers/usb/class/cdc-acm.c+3 -90 replies
5/10tty: introduce wait_event_interruptible_ttydrivers/char/cyclades.c drivers/char/istallion.c drivers/char/n_r3964.c +4 more+56 -100 replies
6/10tty: annotate tty_write_lockdrivers/char/tty_io.c+5 -00 replies
7/10tty: reorder ldisc lockingdrivers/char/selection.c drivers/char/tty_ldisc.c+27 -60 replies
8/10tty: untangle locking of wait_until_sentdrivers/char/amiserial.c drivers/serial/68360serial.c drivers/serial/crisv10.c +1 more+31 -151 reply
9/10tty: remove tty_lock_nesteddrivers/char/pty.c drivers/char/selection.c drivers/char/stallion.c +3 more+27 -410 replies
10/10tty: implement BTM as mutex instead of BKLdrivers/char/Makefile drivers/char/tty_mutex.c include/linux/tty.h +1 more+66 -02 replies

Reviews trailers per patch

None of the 10 patches has a Reviewed-by or Acked-by of their own; the series has one for all of them.

PatchAlan Cox
SeriesA-b
1/10
2/10
3/10
4/10
5/10
6/10
7/10
8/10
9/10
10/10

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v3 thread

Cover letter [PATCH v3 00/10] BKL conversion in tty layer

This is the third attempt to get the BKL out of the TTY code. This version goes much further than the previous one, and eliminates most of the code I had introduced there.

What remains of the series are changes to the existing BKL usage in the TTY layer to avoid depending on the autorelease-during-sleep or the recursive behavior. The final patch simply adds the option to replace the BKL with a plain mutex.

The series is available as a git tree in the bkl/tty branch of
git://git.kernel.org/pub/scm/linux/kernel/git/arnd/playground.git
There is also a bkl/tty-history branch with a much more detailed series that I used to get to this point. Both series are bisectable.

Arnd Bergmann (10):
tty: replace BKL with a new tty_lock
tty: never hold BTM while getting tty_mutex
tty: fix console_sem lock order
cdc-acm: remove dead code
tty: introduce wait_event_interruptible_tty
tty: annotate tty_write_lock
tty: reorder ldisc locking
tty: untangle locking of wait_until_sent
tty: remove tty_lock_nested
tty: implement BTM as mutex instead of BKL

 drivers/char/Makefile          |    1 +
 drivers/char/amiserial.c       |   23 ++++--
 drivers/char/briq_panel.c      |    6 +-
 drivers/char/cyclades.c        |    2 +-
 drivers/char/istallion.c       |   12 ++-
 drivers/char/n_hdlc.c          |   16 ++--
 drivers/char/n_r3964.c         |   10 ++--
 drivers/char/pty.c             |   24 +++----
 drivers/char/selection.c       |   13 +++-
 drivers/char/serial167.c       |    4 +-
 drivers/char/stallion.c        |    2 +
 drivers/char/sx.c              |   12 ++--
 drivers/char/tty_io.c          |  138 ++++++++++++++++++++++-----------------
 drivers/char/tty_ldisc.c       |   43 +++++++++----
 drivers/char/tty_mutex.c       |   47 ++++++++++++++
 drivers/char/tty_port.c        |    2 +-
 drivers/char/vc_screen.c       |    4 +-
 drivers/char/vt_ioctl.c        |   12 ++--
 drivers/serial/68360serial.c   |    2 -
 drivers/serial/crisv10.c       |    6 +-
 drivers/serial/serial_core.c   |   39 ++++++++----
 drivers/usb/class/cdc-acm.c    |   12 +---
 drivers/video/console/vgacon.c |    2 -
 include/linux/tty.h            |   64 ++++++++++++++++++
 lib/Kconfig.debug              |   10 +++
 25 files changed, 338 insertions(+), 168 deletions(-)
 create mode 100644 drivers/char/tty_mutex.c