lkml.org 
[lkml]   [2003]   [Jan]   [12]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectFixing the tty layer was Re: any chance of 2.6.0-test*?
From
Date

[forgot to cc linux-kernel in the first try, sorry if you see it twice]

Greg KH <greg@kroah.com> writes:

> On Fri, Jan 10, 2003 at 05:19:08PM +0000, Alan Cox wrote:
> > The entire tty layer locking is terminally broken and nobody has even
> > started fixing it. Just try a mass of parallel tty/pty activity . It
> > was problematic before, pre-empt has taken it to dead, defunct and
> > buried.
>
> I've looked into this, and wow, it's not a simple fix :(

it has to be fixed for 2.6, no argument.

I took a look at it. I think the easiest strategy would be:

- Make sure all the process context code holds BKL
(most of it does, but not all - sometimes it is buggy like in
disassociate_tty)
I have some patches for that for tty_io.c at least

The local_irq_save in there are buggy, they need to take
a lock.

- Audit the data structures that are touched by interrupts
and add spinlocks.
At least for n_tty.c probably just tty->read_lock needs to be
extended.
Perhaps some can be just "fixed" by ignoring latency and pushing
softirq functions into keventd
(modern CPUs should be fast enough for that)

- Possibly disable module unloading for ldiscs (seems to be rather broken,
although Rusty's new unload algorithm may avoid the worst - not completely
sure)

Probably all doable with some concentrated effort.

Anyone interested in helping ?

-Andi
-
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/

\
 
 \ /
  Last update: 2005-03-22 13:32    [W:0.060 / U:0.800 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site