tty: move global ldisc idle waitqueue to the individual ldisc

The global wait_queue that is used for line discipline idle handling is
moved to a separate wait_queue for each line instance. This prevents
unnecessary blocking on one line, because of idle handling on another
line.

Signed-off-by: Ivo Sieben <meltedpianoman@gmail.com>
Acked-by: Alan Cox <alan@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
Ivo Sieben 2012-05-03 14:37:43 +02:00 committed by Greg Kroah-Hartman
parent 3e62c413fb
commit 1541f845d1
2 changed files with 6 additions and 3 deletions

View file

@ -110,6 +110,7 @@
#include <linux/fs.h>
#include <linux/wait.h>
#include <linux/pps_kernel.h>
#include <linux/wait.h>
struct tty_ldisc_ops {
int magic;
@ -154,6 +155,7 @@ struct tty_ldisc_ops {
struct tty_ldisc {
struct tty_ldisc_ops *ops;
atomic_t users;
wait_queue_head_t wq_idle;
};
#define TTY_LDISC_MAGIC 0x5403