Subject: Re: TTY virtualization driver
To: None <>
From: Jason R Thorpe <>
List: tech-kern
Date: 01/24/2002 13:31:40
On Mon, Jan 21, 2002 at 07:29:06PM -0000, wrote:

 > What if we add a driver that uses the minor number to traverse the
 > ttylist to locate an instance and redirects to that driver?  That
 > way you can create a set of `/dev/tty??' and `/dev/dty??' and not
 > have to mess with a different set of names for each serial controller.
 > (Yes, there needs to be code to skip over pty instances, but that
 > should be simple.)

So, the idea of having a virtualized TTY layer is nice, but there are
some real problems with it, the biggest one being naming.

	(1) If you use the autoconfiguration machinery to assign
	    virtual names to physical hardware, then you have
	    the really annoying problem of spew when you attach
	    large multi-port serial adapters, e.g. Cyclades-Z
	    boards, which have 16, 32, 48, or 64 ports.

	(2) If you don't use autoconfiguration machinery, then you
	    have now put the kernel in charge of device naming policy,
	    which is no different than the current situation.  But, it's
	    actually worse than the current situation, because with the
	    current situation, you can still wire down driver instance
	    unit numbers using config.

	(3) This is good for "TTY virtualization", but the TTY line
	    discipline is only one thing you might be interested in
	    hooking up to a serial port driver.  You yourself have
	    already had to deal with attaching a non-TTY line discipline
	    to a UART driver (Sun keyboard on 16550).  It seems like
	    any attempt to virtualize TTY instances should also attempt
	    to address this broader problem of picking the appropriate
	    default line discipline for a device.

        -- Jason R. Thorpe <>