[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date: Tue, 09 Sep 2008 07:15:12 -0600
From: Joe Peterson <joe@...rush.com>
To: Alan Cox <alan@...rguk.ukuu.org.uk>
CC: Andrew Morton <akpm@...ux-foundation.org>,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH] TTY: Fix loss of echoed characters (2nd follow-on PATCH
attached)
Alan Cox wrote:
> If you have the column handling isolated and locked that is a big step
> towards exterminating the BKL in the n_tty code. It also illustrates why
> locking people always say "lock data not code".
Well, it's isolated, but still locked with the BKL, which would be great
to get rid of. A few questions for you, since you've worked with this
code (and kernel locking stuff) a lot longer than I:
1) Now that column state is confined to the process_out/echo funcs in
n_tty, would using tty_write_lock() (the defined atomic write lock
mutex) be a good replacement for lock_kernel(), even though interruptible?
2) To protect echo buffer operations, I would lean toward using a
separate echo lock mutex so it does not lock against non-echo-buffer
output. Would nesting this with #1 be advisable? Should it be
interruptable?
3) tty_write() mentions refers to ldisc use of the BKL. If we change
this, are there any considerations for the tty_io or driver code?
Thanks, Joe
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists