Re: TTY changes to 2.1.65

H. Peter Anvin (hpa@transmeta.com)
26 Nov 1997 04:04:55 GMT


Followup to: <Pine.GSO.3.96.971125220728.27102B-100000@csb>
By author: "Adam D. Bradley" <artdodge@cs.bu.edu>
In newsgroup: linux.dev.kernel
>
> On Tue, 25 Nov 1997, Theodore Y. Ts'o wrote:
> > From: Jes Degn Soerensen <jds@kom.auc.dk>
> >
> > I see no reason for wasting all these majors on this and IMHO it is a
> > lot better to use dynamic allocation of serial devices, thus if one
> > replaces a serial board with a different brand it is not necessary to
> > go and change the entire software setup.
> >
> > It's something to think about, but doing this in a way that doesn't
> > break compatibility with either (a) existing systems' /dev directories
> > and (b) all of the existing tty device drivers will be a wee bit
> > challenging. It'll probably be a while before I get to this one,
> > actually.
>
> A possible intermediate solution would be a "generic" driver, with its
> own major number, which is a run-time configurable thin wrapper around
> "real" serial driver syscalls.
>
> The implementation should be fairly simple... all syscalls to devices
> with the "generic" major would get multiplexed (based upon their
> minor) to the "real" major handler, possible with the minor number
> offset or mapped in some other way. This could be applied in general
> to any character device, or even block devices for that matter...
> (another way of looking at the SCSI numbering problem?)
>

I seem to miss the point here. To me this sounds like a huge step
backwards. Dynamic allocation is nearly always a lose -- it causes
uncool effects (just look at the self-renaming SCSI disk problem), and
board type is an easy distinguisher.

Some people seem to think major numbers are a scarce resource --
they are to some (small) extent right now (the number space is 3/8
full), but we need to go to a larger device number space *anyway* (the
pressure on minors is much worse than the pressure on majors at the
moment) and unless we pick a really stupid allocation scheme, major
numbers should be more than plentiful.

-hpa

-- 
    PGP: 2047/2A960705 BA 03 D3 2C 14 A8 A8 BD  1E DF FE 69 EE 35 BD 74
    See http://www.zytor.com/~hpa/ for web page and full PGP public key
        I am Bahá'í -- ask me about it or see http://www.bahai.org/
   "To love another person is to see the face of God." -- Les Misérables