linux-fsdevel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jamie Lokier <jamie@shareable.org>
To: Mike Waychison <Michael.Waychison@Sun.COM>
Cc: "Adam J. Richter" <adam@yggdrasil.com>,
	hbryan@us.ibm.com, linux-fsdevel@vger.kernel.org
Subject: Re: DEVFS_FS
Date: Tue, 16 Nov 2004 19:26:47 +0000	[thread overview]
Message-ID: <20041116192647.GA19365@mail.shareable.org> (raw)
In-Reply-To: <419A5029.5010103@sun.com>

Mike Waychison wrote:
> The udev model does this very
> effectively: where there is hardware backing the device files, there is
> no good reason to not load the drivers and have policy set once and for
> all on udevstart.

(a) boot time, (b) it's typically a few hundred k to be saved.

> The only need for trapping that I can see is for modules that don't have
> hardware backing them, such as tun and loop.

There's quite a few devices like that.

> In fact, the opposite is true: userspace should not care at all about
> major/minor.  Userspace should care about the semantics of the available
> device nodes available in /dev.  With hardware, I want to _see_ the
> device nodes created when I _add_ hardware.  udev handles this semantic
> very well.  Where it fails is solely in the added devfs semantic of
> modprobing on lookups of non-existing device nodes.  _This_ is the case
> where some form of trapping would help very much.

I agree, this is desirable behaviour.  But it isn't perfect.

Better than trapping would be if /dev/net/tun0 and so forth did
actually exist in /dev, to indicate the availability of those devices,
but the modules were still autoloaded on first access.

It would also be nicer if the device nodes were created to indicate
available/installed devices, without actually initialising the devices
or loading the bulk of their driver until they're needed.

In other words, if /dev were auto-generated based on all available
hardware and all available non-hardware drivers for the current
kernel, including modules not yet loaded.

That would be better IMNSHO, to the extent that it's possible.

Although it's necessary to load drivers for some devices (like ISA
cards) to detect them, it isn't necessary to load PCI drivers to
detect that they are present.  A mapping directly from detected PCI
ids to whatever udev needs could be extracted from the drivers at
compile time.  Such mappings nearly exist now, except that the mapping
is from ids to drivers, instead of ids to dev info.

-- Jamie

  reply	other threads:[~2004-11-16 19:26 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-11-16  6:09 DEVFS_FS Adam J. Richter
2004-11-16 19:08 ` DEVFS_FS Mike Waychison
2004-11-16 19:26   ` Jamie Lokier [this message]
2004-11-16 19:42     ` DEVFS_FS Greg KH
2004-11-16 19:48     ` DEVFS_FS Mike Waychison
2004-11-17 18:19     ` DEVFS_FS Bryan Henderson
2004-11-17 18:28       ` DEVFS_FS Jamie Lokier
2004-11-16 19:47 ` DEVFS_FS Bryan Henderson
  -- strict thread matches above, loose matches on Subject: below --
2004-11-13 16:29 DEVFS_FS Adam J. Richter
2004-11-15 19:35 ` DEVFS_FS Bryan Henderson
2004-11-11 19:53 DEVFS_FS Adam J. Richter
2004-11-11 23:00 ` DEVFS_FS Bryan Henderson
2004-11-12  5:55   ` DEVFS_FS Jamie Lokier
2004-11-12 18:50     ` DEVFS_FS Bryan Henderson

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=20041116192647.GA19365@mail.shareable.org \
    --to=jamie@shareable.org \
    --cc=Michael.Waychison@Sun.COM \
    --cc=adam@yggdrasil.com \
    --cc=hbryan@us.ibm.com \
    --cc=linux-fsdevel@vger.kernel.org \
    /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;
as well as URLs for NNTP newsgroup(s).