public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2 00/13] BKL conversion in tty layer
@ 2010-05-04 22:33 Arnd Bergmann
  2010-05-04 22:33 ` [PATCH 01/13] tty: replace BKL with a new tty_lock Arnd Bergmann
                   ` (13 more replies)
  0 siblings, 14 replies; 25+ messages in thread
From: Arnd Bergmann @ 2010-05-04 22:33 UTC (permalink / raw)
  To: linux-kernel
  Cc: Arnd Bergmann, Alan Cox, Greg KH, Frederic Weisbecker,
	Thomas Gleixner, Andrew Morton, John Kacur, Al Viro, Ingo Molnar

This is the second attempt to get the BKL out of the
TTY code. I've updated the patches to be based on top
of Alan's series and improved a number of things.

This series still introduces a new Big TTY Mutex
that is based on the earlier implementation of the
Big Kernel Semaphore, but comes with a number of changes:

 - based on the mutex code instead of a semaphore,
   so we can use all the mutex debugging.
 - no autorelease on sleep, which is what most of the
   series is about.
 - limited to one subsystem only.
 - ability to annotate nested locking so we can eventually
   turn it into a non-recursive mutex, once all the
   recursive users stay around.

The first eight patches convert all the code using the BKL
in the TTY layer and related drivers to the new interface,
and patch 9/13 then adds the real mutex implementation
as an experimental configuration option.

When that option is disabled, the behaviour should be
basically unchanged regarding serialization against
other subsystems using the BKL.

The final four patches are new and do some real
cleanup, intended to improve the TTY locking
towards moving the BTM out. These are not required
for the big picture of the BKL removal, nothing
else depends on this. I'd still like to hear
from Alan if he thinks this part is useful for
his work on the problem or if we should just leave
it out.

Arnd Bergmann (13):
  tty: replace BKL with a new tty_lock
  tty: make atomic_write_lock release tty_lock
  tty: make tty_port->mutex nest under tty_lock
  tty: make termios mutex nest under tty_lock
  tty: make ldisc_mutex nest under tty_lock
  tty: never hold BTM while getting tty_mutex
  tty: give up BTM in acquire_console_sem
  tty: release tty lock when blocking
  tty: implement BTM as mutex instead of BKL
  tty: untangle locking of wait_until_sent
  tty: remove tty_lock_nested
  tty: remove release_tty_lock/reacquire_tty_lock
  tty: turn ldisc_mutex into a regular mutex

 drivers/char/Makefile           |    1 +
 drivers/char/amiserial.c        |   18 +++---
 drivers/char/briq_panel.c       |    6 +-
 drivers/char/cyclades.c         |    4 +-
 drivers/char/generic_serial.c   |    2 +-
 drivers/char/hvc_console.c      |    2 +-
 drivers/char/hvcs.c             |    2 +-
 drivers/char/ip2/ip2main.c      |   20 +++++-
 drivers/char/isicom.c           |    4 +-
 drivers/char/istallion.c        |   16 +++--
 drivers/char/moxa.c             |    6 +-
 drivers/char/mxser.c            |   10 ++--
 drivers/char/n_hdlc.c           |   16 ++--
 drivers/char/n_r3964.c          |   10 ++--
 drivers/char/pty.c              |   26 +++----
 drivers/char/riscom8.c          |    4 +-
 drivers/char/rocket.c           |    6 +-
 drivers/char/selection.c        |    4 +-
 drivers/char/serial167.c        |   10 ++--
 drivers/char/specialix.c        |    6 +-
 drivers/char/stallion.c         |   10 ++-
 drivers/char/sx.c               |   12 ++--
 drivers/char/synclink.c         |    8 +-
 drivers/char/synclink_gt.c      |    8 +-
 drivers/char/synclinkmp.c       |   10 ++--
 drivers/char/tty_buffer.c       |    6 ++-
 drivers/char/tty_io.c           |  146 ++++++++++++++++++++++-----------------
 drivers/char/tty_ioctl.c        |   73 ++++++++++++++-----
 drivers/char/tty_ldisc.c        |   56 ++++++++++-----
 drivers/char/tty_mutex.c        |   50 +++++++++++++
 drivers/char/tty_port.c         |    8 +-
 drivers/char/vc_screen.c        |    4 +-
 drivers/char/vt_ioctl.c         |   12 ++--
 drivers/isdn/i4l/isdn_common.c  |   20 +++---
 drivers/isdn/i4l/isdn_tty.c     |   10 ++--
 drivers/mmc/card/sdio_uart.c    |    2 +-
 drivers/net/irda/irtty-sir.c    |    5 +-
 drivers/serial/68328serial.c    |    2 +-
 drivers/serial/68360serial.c    |    5 +-
 drivers/serial/crisv10.c        |   17 +++--
 drivers/serial/pmac_zilog.c     |    4 +-
 drivers/serial/serial_core.c    |   43 +++++------
 drivers/staging/strip/strip.c   |    2 +-
 drivers/usb/class/cdc-acm.c     |    2 +-
 drivers/usb/serial/opticon.c    |    2 +-
 drivers/usb/serial/usb-serial.c |   18 +++---
 drivers/video/console/vgacon.c  |    4 +-
 include/linux/init_task.h       |    1 +
 include/linux/sched.h           |    1 +
 include/linux/tty.h             |  145 ++++++++++++++++++++++++++++++++++++++
 kernel/fork.c                   |    1 +
 kernel/printk.c                 |   14 ++++-
 lib/Kconfig.debug               |   10 +++
 net/irda/ircomm/ircomm_tty.c    |    2 +-
 54 files changed, 599 insertions(+), 287 deletions(-)
 create mode 100644 drivers/char/tty_mutex.c


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

end of thread, other threads:[~2010-05-24 20:21 UTC | newest]

Thread overview: 25+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-05-04 22:33 [PATCH v2 00/13] BKL conversion in tty layer Arnd Bergmann
2010-05-04 22:33 ` [PATCH 01/13] tty: replace BKL with a new tty_lock Arnd Bergmann
2010-05-04 22:33 ` [PATCH 02/13] tty: make atomic_write_lock release tty_lock Arnd Bergmann
2010-05-05 10:57   ` Alan Cox
2010-05-04 22:33 ` [PATCH 03/13] tty: make tty_port->mutex nest under tty_lock Arnd Bergmann
2010-05-04 22:33 ` [PATCH 04/13] tty: make termios mutex " Arnd Bergmann
2010-05-05 16:11   ` Arnd Bergmann
2010-05-04 22:33 ` [PATCH 05/13] tty: make ldisc_mutex " Arnd Bergmann
2010-05-04 22:33 ` [PATCH 06/13] tty: never hold BTM while getting tty_mutex Arnd Bergmann
2010-05-04 22:33 ` [PATCH 07/13] tty: give up BTM in acquire_console_sem Arnd Bergmann
2010-05-04 22:33 ` [PATCH 08/13] tty: release tty lock when blocking Arnd Bergmann
2010-05-04 22:33 ` [PATCH 09/13] tty: implement BTM as mutex instead of BKL Arnd Bergmann
2010-05-04 22:33 ` [PATCH 10/13] tty: untangle locking of wait_until_sent Arnd Bergmann
2010-05-05 19:59   ` Alan Cox
2010-05-05 21:31     ` Arnd Bergmann
2010-05-05 22:51     ` Greg KH
2010-05-05 23:52       ` Alan Cox
2010-05-24 19:00     ` Pavel Machek
2010-05-24 20:27       ` Alan Cox
2010-05-04 22:33 ` [PATCH 11/13] tty: remove tty_lock_nested Arnd Bergmann
2010-05-04 22:33 ` [PATCH 12/13] tty: remove release_tty_lock/reacquire_tty_lock Arnd Bergmann
2010-05-04 22:33 ` [PATCH 13/13] tty: turn ldisc_mutex into a regular mutex Arnd Bergmann
2010-05-05  9:18   ` Arnd Bergmann
2010-05-05 10:52 ` [PATCH v2 00/13] BKL conversion in tty layer Alan Cox
2010-05-05 12:24   ` Arnd Bergmann

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox