2004-01-02 11:48:47

by Steve Youngs

[permalink] [raw]
Subject: udev - please help me to understand


Attachments:
(No filename) (1.64 kB)
(No filename) (256.00 B)
Download all attachments

2004-01-02 13:00:41

by Michael Buesch

[permalink] [raw]
Subject: Re: udev - please help me to understand

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On Friday 02 January 2004 12:48, Steve Youngs wrote:
> I have zero hot-pluggable devices (that might change somewhere in the
> distant future, but for now I don't have any). And never in my wildest
> dreams could I ever imagine running out of device numbers.

Yea, _you_ can't imagine this. :) But Kernel developers can... .

> Reading through the documentation that I've found about udev, your
> main points seem to be about:
>
> - udev vs devfs
> - running out of device major/minor numbers
> - not having to worry about major/minor numbers
>
> For me, the first point is moot because I don't use devfs. The second
> point is just plain ridiculous, there is just _no_ way that it could
> happen (remember that I'm talking about my own situation).

I don't think so.
Every new device needs a unique number, that _no other_ device uses.
As more and more devices are developed, we are running out of device
numbers. (well, that may take a while with 32-bit device numbers,
but it may appear so).

> So, Greg, is there _any_ reason why I'd want to be using udev?

(Hm, I'm not Greg, but...)
Because it's cool. :)
No, you're right.
I am not going to use udev or devfs on my server
for example. The reason is quite simple. This server will be running
linux-2.4 until it dies and I will never add some more device to it.
So there is no point of using udev or devfs on it. I know the hardware,
create all nodes for it and it runs (without all the problems devfs
and udev still provide).
But on my main Computer I am going to use udev, because I love it's
flexibility.

_You_ have to decide if you need udev or don't. Nobody else can decide
it for you.

- --
Regards Michael Buesch [ http://www.tuxsoft.de.vu ]

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.4 (GNU/Linux)

iD8DBQE/9WtsFGK1OIvVOP4RAoD2AKCMOAVWp226hzMQxju9Yo7t8uO7FQCguSJe
7XksJs4zqwCeFyBQkcBOn98=
=chS9
-----END PGP SIGNATURE-----

2004-01-02 20:23:47

by Greg KH

[permalink] [raw]
Subject: Re: udev - please help me to understand

On Fri, Jan 02, 2004 at 07:36:36AM -0500, Mark Mielke wrote:
>
> Personally, I like the idea of having a clean /dev where names only
> exist for devices that I care about. On my Fedora Core 1 box, it looks
> like /dev is currently:
>
> $ ls /dev | wc -l
> 7528
>
> Seven *THOUSAND* five hundred and twenty eight. Sheesh. I probably only
> use a few dozen, or maybe even a few hundred, but definately not 7000+.

You missed all of the subdirectories. Here's what FC-1 has on my laptop:
$ tree /dev/ | tail -1
41 directories, 18721 files

thanks,

greg k-h

2004-01-02 20:23:55

by Greg KH

[permalink] [raw]
Subject: Re: udev - please help me to understand

On Fri, Jan 02, 2004 at 09:48:36PM +1000, Steve Youngs wrote:
> Hi Greg!
>
> I've been looking at this "udev" thingy and I can't for the life of me
> see why I'd need it. There doesn't appear to be _any_ advantages of
> using udev in my present situation.

Ok, great. Then don't use it, I'm not forcing you to for 2.6 :)

> No, I don't use devfs.
>
> I have zero hot-pluggable devices (that might change somewhere in the
> distant future, but for now I don't have any). And never in my wildest
> dreams could I ever imagine running out of device numbers.
>
> Reading through the documentation that I've found about udev, your
> main points seem to be about:
>
> - udev vs devfs
> - running out of device major/minor numbers
> - not having to worry about major/minor numbers
>
> For me, the first point is moot because I don't use devfs. The second
> point is just plain ridiculous, there is just _no_ way that it could
> happen (remember that I'm talking about my own situation).

If you never have any hotpluggable devices, nor any need to move disks
around in your system, then you don't need udev.

Hope this helps,

greg k-h

2004-01-02 20:41:54

by T'aZ

[permalink] [raw]
Subject: Re: udev - please help me to understand

On Fri, 2 Jan 2004 12:21:25 -0800
Greg KH <[email protected]> wrote:

> On Fri, Jan 02, 2004 at 07:36:36AM -0500, Mark Mielke wrote:
> >
> > Personally, I like the idea of having a clean /dev where names only
> > exist for devices that I care about. On my Fedora Core 1 box, it looks
> > like /dev is currently:
> >
> > $ ls /dev | wc -l
> > 7528
> >
> > Seven *THOUSAND* five hundred and twenty eight. Sheesh. I probably only
> > use a few dozen, or maybe even a few hundred, but definately not 7000+.
>
> You missed all of the subdirectories. Here's what FC-1 has on my laptop:
> $ tree /dev/ | tail -1
> 41 directories, 18721 files
>
> thanks,
>
> greg k-h
> -
> To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
> the body of a message to [email protected]
> More majordomo info at http://vger.kernel.org/majordomo-info.html
> Please read the FAQ at http://www.tux.org/lkml/
>


--
T'aZ |Jabber:[email protected]|GPG keyID:E051925D|http://taz.prout.be
*They that can give up essential liberty to obtain a little temporary
safety deserve neither liberty nor safety.* Benjamin Franklin 1759
*Beaucoup,vite,loin,mal.* http://www.cl.cam.ac.uk/~rja14/tcpa-faq.html

2004-01-03 01:00:18

by J.A. Magallon

[permalink] [raw]
Subject: Re: udev - please help me to understand


On 01.02, Greg KH wrote:
> On Fri, Jan 02, 2004 at 09:48:36PM +1000, Steve Youngs wrote:
> > Hi Greg!
> >
> > I've been looking at this "udev" thingy and I can't for the life of me
> > see why I'd need it. There doesn't appear to be _any_ advantages of
> > using udev in my present situation.
>
> Ok, great. Then don't use it, I'm not forcing you to for 2.6 :)
>
> > No, I don't use devfs.
> >
> > I have zero hot-pluggable devices (that might change somewhere in the
> > distant future, but for now I don't have any). And never in my wildest
> > dreams could I ever imagine running out of device numbers.
> >
> > Reading through the documentation that I've found about udev, your
> > main points seem to be about:
> >
> > - udev vs devfs
> > - running out of device major/minor numbers
> > - not having to worry about major/minor numbers
> >
> > For me, the first point is moot because I don't use devfs. The second
> > point is just plain ridiculous, there is just _no_ way that it could
> > happen (remember that I'm talking about my own situation).
>
> If you never have any hotpluggable devices, nor any need to move disks
> around in your system, then you don't need udev.
>

Don't think so. My first use for udev is a cluster (when bproc works on
2.6 ;)). Or in general diskless booting.

You build your initrd for remote boot. You have two options:
- copy a full /dev from a working host (tons of files that make the rd big
just to fit all the inodes).
- spend a lot of time guessing what is and what is not needed on each node
(you can have ata drives, scsi ones, different network cards, different
graphics cards...)

I just want to boot with and empty /dev and let udev populate it, even with
same device names for different hadrware. And nodes will never hotplug anything.

IE, I want a working and race free devfs, and this is udev.

--
J.A. Magallon <jamagallon()able!es> \ Software is like sex:
werewolf!able!es \ It's better when it's free
Mandrake Linux release 10.0 (Cooker) for i586
Linux 2.6.1-rc1-jam1 (gcc 3.3.2 (Mandrake Linux 10.0 3.3.2-3mdk))

2004-01-03 12:54:51

by Witukind

[permalink] [raw]
Subject: Re: udev - please help me to understand

On Sat, 3 Jan 2004 02:00:10 +0100
"J.A. Magallon" <[email protected]> wrote:
> IE, I want a working and race free devfs, and this is udev.

Well udev != devfs. I think it's two different ways to solve a same problem.
What I wonder now is why do we need both /proc and sysfs?

--
Jabber: [email protected]

2004-01-03 21:56:50

by Greg KH

[permalink] [raw]
Subject: Re: udev - please help me to understand

On Sat, Jan 03, 2004 at 01:54:33PM +0100, Witukind wrote:
> On Sat, 3 Jan 2004 02:00:10 +0100
> "J.A. Magallon" <[email protected]> wrote:
> > IE, I want a working and race free devfs, and this is udev.
>
> Well udev != devfs. I think it's two different ways to solve a same problem.
> What I wonder now is why do we need both /proc and sysfs?

procfs is for process information.
sysfs is for system information. Slowly, over time, things that are
currently in procfs will be moving to sysfs.

thanks,

greg k-h

2004-01-04 16:03:09

by Kevin P. Fleming

[permalink] [raw]
Subject: Re: udev - please help me to understand

Greg KH wrote:

> procfs is for process information.
> sysfs is for system information. Slowly, over time, things that are
> currently in procfs will be moving to sysfs.

Slight clarification:

Slowly, over time, things that are currently in procfs _that never
belonged there_ will be moving to sysfs. procfs isn't going away, it's
just being converted back to its original purpose (that of providing
process-specific information).