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

Ingo Molnar
2004-09-14T11:31:10Z

[-- Attachment #1: Type: text/plain, Size: 162 bytes --]

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

[-- Attachment #2: fix-latency-pty.patch --]
[-- Type: text/plain, Size: 474 bytes --]

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@elte.hu>

--- 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 {