[patch] sched, pty: fix scheduling latencies in pty.c

From: Ingo Molnar
Date: Tue Sep 14 2004 - 06:34:56 EST



the attached patch fixes long scheduling latencies in pty_read()caused
by the BKL.

has been tested as part of the -VP patchset and in earlier -mm trees.

Ingo

the attached patch fixes long scheduling latencies in pty_read()caused
by the BKL.

has been tested as part of the -VP patchset and in earlier -mm trees.

Signed-off-by: Ingo Molnar <mingo@xxxxxxx>

--- linux/drivers/char/pty.c.orig
+++ linux/drivers/char/pty.c
@@ -139,6 +139,7 @@ static int pty_write(struct tty_struct *
c += n;
count -= n;
to->ldisc.receive_buf(to, temp_buffer, NULL, n);
+ cond_resched();
}
up(&tty->flip.pty_sem);
} else {