Re: tty's use of file_list_lock and file_move

From: Jon Smirl
Date: Mon Jul 10 2006 - 13:26:10 EST


On 7/10/06, Alan Cox <alan@xxxxxxxxxxxxxxxxxxx> wrote:
Ar Llu, 2006-07-10 am 11:10 -0400, ysgrifennodd Jon Smirl:
> Since you want a new subject can you explain tty's use of file_lock to
> me? Is there some non-obvious global coordination happening here or is
> it work breaking down the big kernel lock that never got finished?

Its explained in the comment in do_SAK.

This problem seems to be aggravated by reusing the tty_struct for that
tty. With the refcount patch it is now easy to disassociate an
existing tty (and the processes attached to it) from the array
tracking tty minors. A new clean tty_struct can be allocated and made
visible. Init will grab this new struct. Now there is no way to get to
the old one and it can be cleaned up and deleted.

Is this strategy worth coding up? It would really simplify the locking issues.

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