From: "H. Peter Anvin" <hpa@transmeta.com>
To: Alan Cox <alan@lxorguk.ukuu.org.uk>
Cc: Linus Torvalds <torvalds@transmeta.com>,
Andries.Brouwer@cwi.nl, linux-kernel@vger.kernel.org,
tytso@MIT.EDU
Subject: Re: Larger dev_t
Date: Tue, 27 Mar 2001 14:13:47 -0800 [thread overview]
Message-ID: <3AC1109A.8459E52@transmeta.com> (raw)
In-Reply-To: <E14i0u8-0004N1-00@the-village.bc.nu>
Alan Cox wrote:
>
> > Another example: all the stupid pseudo-SCSI drivers that got their own
> > major numbers, and wanted their very own names in /dev. They are BAD for
> > the user. Install-scripts etc used to be able to just test /dev/hd[a-d]
> > and /dev/sd[0-x] and they'd get all the disks. Deficiencies in the SCSI
>
> Sorry here I have to disagree. This is _policy_ and does not belong in the
> kernel. I can call them all /dev/hdfoo or /dev/disc/blah regardless of
> major/minor encoding. If you dont mind kernel based policy then devfs
> with /dev/disc already sorts this out nicely.
>
> IMHO more procfs crud is also not the answer. procfs is already poorly
> managed with arbitary and semi-random namespace. Its a beautiful example of
> why adhoc naming is as broken as random dev_t allocations. Maybe Al Viro's
> per device file systems solve that.
>
In some ways, they make matters worse -- now you have to effectively keep
a device list in /etc/fstab. Not exactly user friendly.
devfs -- in the abstract -- really isn't that bad of an idea; after all,
device names really do specify an interface. Something I suggested also,
at some point, was to be able to pass strings onto character device
drivers (so that if /dev/foo is a char device, /dev/foo/bar would access
the same device with the string "bar" passed on to the device driver --
this would help deal with "same device, different options" such as
/dev/ttyS0 versus /dev/cua0 -- having flags to open() is really ugly
since there tends to be no easy way to pass them down through multiple
layers of user-space code.)
The problems with devfs (other than kernel memory bloat, which is pretty
much guaranteed to be much worse than the bloat a larger dev_t would
entail) is that it needs complex auxilliary mechanisms to make
"chmod /dev/foo" work as expected (the change to /dev/foo is to be
permanent, without having to edit some silly config file) -- this is
where the policy comes in, much more so than namespace -- and the fact
that it tries to impose a namespace on character devices which is utterly
different from the currently established interface. It may very well be
"better" (although /dev/misc/ is much too ugly to live -- if you have to
separate things up, do so on functional lines!!!), but it is still
*different*, which means it breaks anything that accesses char devices.
Block devices, obviously, is not a problem -- that's what /etc/fstab is
for.
At OLS, I discussed the following issues with Richard and Alan. We
didn't really reach an agreement -- I hope we can discuss it again at the
kernel summit -- but I wouldn't object to devfs if it resolved these
issues:
a) A way to allocate device nodes without automatically instantiating
them in kernel space. For devices where each minor doesn't require
kernel memory until used, the devfs overhead easily becomes unacceptable.
b) Use the established namespace, or put forward a comprehensive plan to
alter the namespace -- and do the necessary legwork to obtain buy-in from
everyone concerned. In the case of tty's, this means modifying the
locking protocol; this in itself isn't a bad thing (the locking protocol
has some serious flaws), but it needs to be explicit, written down, and
widely publicized, well ahead of time. A flag day of this magnitude will
*HURT*.
c) Make sure chown/chmod/link/symlink/rename/rm etc does the right thing,
without the need for "tar hacks" or anything equivalently gross.
Richard indicated being willing to fix (a) and (c). (b) is the main
sticking point at this stage.
That being said, I will be perfectly happy to acknowledge that using a
device filesystem has some nice features, especially in conjunction with
hotplugging devices. It is definitely far better than /proc hackery, and
does permit putting the object-oriented aspects of the VFS to good
advantage. The bloat is an issue, but with the memory sizes available
today it's less than it has been in the past.
Modulo the issues I have listed above, I would at this stage be in favour
to move to a devfs-based system, especially after Al Viro's "one
filesystem" (filesystem always exists in exactly one copy, regardless of
if it is mounted or not) changes. I know this is probably a bit of a
shock to lots of people, but times change; hotplugging is a major issue
these days, big memories are available without requiring a matching big
budget, and there seems to be a bigger willingness to work out the
remaining issues. What I would like to see is working out the issues
listed above, and then rather quickly move to a devfs-*BASED* system
(devfs is the only way to do devices), so that we can take advantage of
the VFS.
-hpa
--
<hpa@transmeta.com> at work, <hpa@zytor.com> in private!
"Unix gives you enough rope to shoot yourself in the foot."
http://www.zytor.com/~hpa/puzzle.txt
next prev parent reply other threads:[~2001-03-27 22:15 UTC|newest]
Thread overview: 95+ messages / expand[flat|nested] mbox.gz Atom feed top
2001-03-27 9:29 Larger dev_t Andries.Brouwer
2001-03-27 18:48 ` Linus Torvalds
2001-03-27 19:28 ` H. Peter Anvin
2001-03-27 19:51 ` Linus Torvalds
2001-03-27 21:21 ` Alan Cox
2001-03-27 21:35 ` Linus Torvalds
2001-03-27 22:02 ` Andre Hedrick
2001-03-27 23:57 ` Linus Torvalds
2001-03-28 21:23 ` Martin Dalecki
2001-03-28 21:40 ` H. Peter Anvin
2001-03-28 21:44 ` Andre Hedrick
2001-03-27 22:16 ` Alan Cox
2001-03-27 22:16 ` H. Peter Anvin
2001-03-27 22:43 ` Russell King
2001-03-28 16:59 ` Jeff Randall
2001-03-28 0:07 ` Linus Torvalds
2001-03-28 0:10 ` H. Peter Anvin
2001-03-28 0:24 ` Linus Torvalds
2001-03-28 2:19 ` Alan Cox
2001-03-28 7:08 ` Andre Hedrick
2001-03-28 21:32 ` Martin Dalecki
2001-03-29 3:53 ` Alan Cox
2001-03-29 11:02 ` Martin Dalecki
2001-04-02 20:02 ` Alan Cox
2001-04-03 7:25 ` Martin Dalecki
2001-04-03 12:19 ` Alan Cox
2001-04-03 12:13 ` Martin Dalecki
2001-04-03 12:38 ` Alan Cox
2001-04-04 8:08 ` Rogier Wolff
2001-03-30 6:54 ` Kai Henningsen
2001-03-28 21:18 ` Martin Dalecki
2001-03-27 22:13 ` H. Peter Anvin [this message]
2001-03-27 22:55 ` Dan Hollis
2001-03-27 22:58 ` H. Peter Anvin
2001-03-27 23:42 ` Richard Gooch
2001-03-28 1:03 ` Paul Jakma
2001-03-28 1:35 ` Alexander Viro
2001-03-27 23:44 ` Andrew Pimlott
2001-03-28 0:28 ` Albert D. Cahalan
2001-03-28 3:58 ` Johan Kullstam
2001-03-28 4:23 ` Alexander Viro
2001-03-28 11:57 ` Jesse Pollard
2001-03-28 18:13 ` Oliver Neukum
2001-03-28 19:05 ` Jesse Pollard
2001-03-28 19:50 ` Oliver Neukum
2001-03-28 21:36 ` Martin Dalecki
2001-03-28 21:09 ` Martin Dalecki
2001-03-28 21:24 ` H. Peter Anvin
2001-03-28 21:46 ` Alexander Viro
2001-03-28 20:54 ` Martin Dalecki
2001-03-28 11:52 ` Pjotr Kourzanoff
2001-03-28 12:11 ` Tim Jansen
2001-03-27 19:27 ` Albert D. Cahalan
-- strict thread matches above, loose matches on Subject: below --
2001-04-03 14:48 Wayne.Brown
2001-04-03 15:34 ` Bart Trojanowski
2001-04-02 21:59 Andries.Brouwer
2001-04-02 20:17 Andries.Brouwer
2001-04-02 21:45 ` Alan Cox
2001-04-03 7:28 ` Martin Dalecki
2001-04-03 10:09 ` Ingo Oeser
2001-04-03 12:06 ` Alan Cox
2001-04-03 12:20 ` Ingo Oeser
2001-04-03 12:15 ` Martin Dalecki
2001-04-03 12:53 ` Alan Cox
2001-04-03 16:05 ` Richard Gooch
2001-04-03 16:34 ` Alexander Viro
2001-04-03 16:58 ` Richard Gooch
2001-04-03 16:54 ` Alan Cox
2001-04-03 17:02 ` Richard Gooch
2001-04-03 12:41 ` Alan Cox
2001-04-03 23:28 ` Tim Wright
2001-03-27 22:38 Jesse Pollard
2001-03-27 22:44 ` H. Peter Anvin
2001-03-26 21:18 John Byrne
2001-03-26 22:12 ` Linus Torvalds
2001-03-26 23:41 ` Guest section DW
2001-03-25 12:31 Andries.Brouwer
2001-03-25 15:35 ` Wichert Akkerman
2001-03-25 16:15 ` Mitchell Blank Jr
2001-03-25 16:54 ` Michel Wilson
2001-03-25 17:12 ` Jeff Garzik
2001-03-25 17:00 ` Jamie Lokier
2001-03-25 17:07 ` Anton Altaparmakov
2001-03-25 17:37 ` Michel Wilson
2001-03-25 18:21 ` Guest section DW
2001-03-25 20:50 ` diego
2001-03-25 17:55 ` Gerry
2001-03-27 6:03 ` Linus Torvalds
2001-03-24 16:13 Andries.Brouwer
2001-03-24 14:25 Andries.Brouwer
2001-03-24 14:40 ` Jeff Garzik
2001-03-24 15:00 ` Alexander Viro
2001-03-25 14:22 ` Martin Dalecki
2001-03-25 3:24 ` Linus Torvalds
2001-03-25 14:35 ` Martin Dalecki
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=3AC1109A.8459E52@transmeta.com \
--to=hpa@transmeta.com \
--cc=Andries.Brouwer@cwi.nl \
--cc=alan@lxorguk.ukuu.org.uk \
--cc=linux-kernel@vger.kernel.org \
--cc=torvalds@transmeta.com \
--cc=tytso@MIT.EDU \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox