Re: BKL in tty code?

From: James Simmons (jsimmons@transvirtual.com)
Date: Wed Jan 30 2002 - 17:57:26 EST


> > I'm very much a newbie, and I'm wondering about the big kernel locks
> > in tty_io.c. What exactly are the locks in the read and write for? Is the
> > tty device that contested? Couldn't a finer grained lock be used?
>
> It has less to do with lock contention and much more to do with the
> design of the tty / console layer. It isn't the kernel's prettiest
> code.
>
> There is probably some cleanup that is possible, but really getting the
> thing in gear (which means no BKL, which is probably the hardest part to
> rip out) require some level of rewrite.

I'm working on it in the DJ tree. I'm going from the lowest level up to
the tty layer. I agree with about the BKL. I plan to move
acquire_console_lock into the tty lock shortly. No reason that only the VT
system should be able to take advantage of it. I also plan to implement
that lock on a per hardware device level instead of a general global lock.
This will solve alot of problems. Plus their is no reason why serial
devices or VT tty system have to reimplement the wheel.

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Thu Jan 31 2002 - 21:01:27 EST