* udev and devfs - The final word
@ 2003-12-31 0:29 Greg KH
2003-12-31 0:46 ` Johannes Erdfelt
` (9 more replies)
0 siblings, 10 replies; 19+ messages in thread
From: Greg KH @ 2003-12-31 0:29 UTC (permalink / raw)
To: linux-hotplug-devel, linux-kernel
(This text can be found at
kernel.org/pub/linux/utils/kernel/hotplug/udev_vs_devfs for those who
want to link to it. I'll also update it with info based on the thread I
know is going to spawn from this post...)
Executive summary for those too lazy to read this whole thing:
I don't care about devfs, and I don't want to talk about it at
all anymore. If you love devfs, fine, I'm not trying to tell
anyone what to do. But you really should be looking into using
udev instead. All further email messages sent to me about devfs
will be gladly ignored.
First off, some background. For a description of udev, and what it's
original design goals were, please see the OLS 2003 paper on udev,
available at:
<http://www.kroah.com/linux/talks/ols_2003_udev_paper/Reprint-Kroah-Hartman-OLS2003.pdf>
and the slides for the talk, available at:
<http://www.kroah.com/linux/talks/ols_2003_udev_talk/>
The OLS paper can also be found in the docs/ directory of the udev
tarball, available on kernel.org in the /pub/linux/utils/kernel/hotplug/
directory.
In that OLS paper, I described the current situation of a static /dev
and the current problems that a number of people have with it. I also
detailed how devfs tries to solve a number of these problems. In
hindsight, I should have never mentioned the word, devfs, when talking
about udev. I did so only because it seemed like a good place to start
with. Most people understood what devfs is, and what it does. To
compare udev against it, showing how udev was more powerful, and a more
complete solution to the problems people were having, seemed like a
natural comparison to me.
But no more. I hereby never want to compare devfs and udev again. With
the exception of this message...
The Problems:
1) A static /dev is unwieldy and big. It would be nice to only show
the /dev entries for the devices we actually have running in the
system.
2) We are (well, were) running out of major and minor numbers for
devices.
3) Users want a way to name devices in a persistent fashion (i.e. "This
disk here, must _always_ be called "boot_disk" no matter where in
the scsi tree I put it", or "This USB camera must always be called
"camera" no matter if I have other USB scsi devices plugged in or
not.")
4) Userspace programs want to know when devices are created or removed,
and what /dev entry is associated with them.
The constraints:
1) No policy in the kernel!
2) Follow standards (like the LSB)
3) must be small so embedded devices will use it.
So, how does devfs stack up to the above problems and constraints:
Problems:
1) devfs only shows the dev entries for the devices in the system.
2) devfs does not handle the need for dynamic major/minor numbers
3) devfs does not provide a way to name devices in a persistent
fashion.
4) devfs does provide a deamon that userspace programs can hook into
to listen to see what devices are being created or removed.
Constraints:
1) devfs forces the devfs naming policy into the kernel. If you
don't like this naming scheme, tough.
2) devfs does not follow the LSB device naming standard.
3) devfs is small, and embedded devices use it. However it is
implemented in non-pagable memory.
Oh yeah, and there are the insolvable race conditions with the devfs
implementation in the kernel, but I'm not going to talk about them right
now, sorry. See the linux-kernel archives if you care about them (and
if you use devfs, you should care...)
So devfs is 2 for 7, ignoring the kernel races.
And now for udev:
Problems:
1) using udev, the /dev tree only is populated for the devices that
are currently present in the system.
2) udev does not care about the major/minor number schemes. If the
kernel tomorrow switches to randomly assign major and minor numbers
to different devices, it would work just fine (this is exactly
what I am proposing to do in 2.7...)
3) This is the main reason udev is around. It provides the ability
to name devices in a persistent manner. More on that below.
4) udev emits D-BUS messages so that any other userspace program
(like HAL) can listen to see what devices are created or removed.
It also allows userspace programs to query it's database to see
what devices are present and what they are currently named as
(providing a pointer into the sysfs tree for that specific device
node.)
Constraints:
1) udev moves _all_ naming policies out of the kernel and into
userspace.
2) udev defaults to using the LSB device naming standard. If users
want to deviate away from this standard (for example when naming
some devices in a persistent manner), it is easily possible to do
so.
3) udev is small (49Kb binary) and is entirely in userspace, which
is swapable, and doesn't have to be running at all times.
Nice, 7 out of 7 for udev. Makes you think the problems and constraints
were picked by a udev developer, right? No, the problems and
constraints are ones I've seen over the years and so udev, along with
the kernel driver model and sysfs, were created to solve these real
problems. I also have had the luxury to see the problems that the
current devfs implementation has, and have taken the time to work out
something that does not have those same problems.
So by just looking at the above descriptions, everyone should instantly
realize that udev is far better than devfs and start helping out udev
development, right? Oh, you want more info, ok...
Back in May 2003 I released a very tiny version of udev that implemented
everything that devfs currently does, in about 6Kb of userspace code:
http://marc.theaimsgroup.com/?l=linux-kernel&m\x105003185331553
Yes, that's right, 6Kb. So, you are asking, why are you still working
on udev if it did everything devfs did back in May 2003? That's because
just managing static device nodes based on what the kernel calls the
devices is _not_ the primary goal of udev. It's just a tiny side affect
of it's primary goal, the ability to never worry about major/minor
number assignments and provide the ability to achieve persistent device
names if wanted.
All the people wanting to bring up the udev vs. devfs argument go back
and read the previous paragraph. Yes, all Gentoo users who keep filling
up my inbox with smoking emails, I mean you.
So, how well does udev solve it's goals:
Prevent users from ever worrying about major/minor numbers
And here you were, not knowing you ever needed to worry about
major/minor numbers in the first place, right? Ah, I see you
haven't plugged in 2 USB printers and tried to figure out which
printer was which /dev entry? Or plugged in 4000 SCSI disks and
tried to figure out how to access that 3642nd disk and what it was
called in /dev. Or plugged in a USB camera and a USB flash drive
and then tried to download the pictures off of the flash drive by
accident?
As the above scenarios show, both desktop users and big iron users
both need to not worry about which device is assigned to what
major/minor device.
udev doesn't care what major/minor number is assigned to a device.
It merely takes the numbers that the kernel says it assigned to the
device and creates a device node based on it, which the user can
then use (if you don't understand the whole major/minor to device
node issue, or even what a device node is, trust me, you don't
really want to, go install udev and don't worry about it...) As
stated above, if the kernel decides to start randomly assigning
major numbers to all devices, then udev will still work just fine.
Provide a persistent device naming solution:
Lots of people want to assign a specific name that they can talk to
a device to, no matter where it is in the system, or what order they
plugged the device in. USB printers, SCSI disks, PCI sound cards,
Firewire disks, USB mice, and lots of other devices all need to be
assigned a name in a consistent manner (udev doesn't handle network
devices, naming them is already a solved solution, using nameif).
udev allows users to create simple rules to describe what device to
name. If users want to call a program running a large database
half-way around the world, asking it what to name this device, it
can. We don't put the naming database into the kernel (like other
Unix variants have), everything is in userspace, and easily
accessible. You can even run a perl script to name your device if
you are that crazy...
For more information on how to create udev rules to name devices,
please see the udev man page, and look at the example udev rules
that ship with the tarball.
So, convinced already why you should use udev instead of devfs? No.
Ok, fine, I'm not forcing you to abandon your bloated, stifling policy,
nonextensible, end of life feature if you don't want to. But please
don't bother me about it either, I don't care about devfs, only about
udev.
This is my last posting about this topic, all further emails sent to me
about why devfs is wonderful, and why are you making fun of this
wonderful, stable gift from the gods, will be gleefully ignored and
possibly posted in a public place where others can see.
thanks,
greg k-h
-------------------------------------------------------
This SF.net email is sponsored by: IBM Linux Tutorials.
Become an expert in LINUX or just sharpen your skills. Sign up for IBM's
Free Linux Tutorials. Learn everything from the bash shell to sys admin.
Click now! http://ads.osdn.com/?ad_id\x1278&alloc_id371&op=click
_______________________________________________
Linux-hotplug-devel mailing list http://linux-hotplug.sourceforge.net
Linux-hotplug-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel
^ permalink raw reply [flat|nested] 19+ messages in thread* Re: udev and devfs - The final word
2003-12-31 0:29 udev and devfs - The final word Greg KH
@ 2003-12-31 0:46 ` Johannes Erdfelt
2003-12-31 0:53 ` Prakash K. Cheemplavam
` (8 subsequent siblings)
9 siblings, 0 replies; 19+ messages in thread
From: Johannes Erdfelt @ 2003-12-31 0:46 UTC (permalink / raw)
To: linux-hotplug
On Tue, Dec 30, 2003, Greg KH <greg@kroah.com> wrote:
> So, how does devfs stack up to the above problems and constraints:
> Problems:
> 2) devfs does not handle the need for dynamic major/minor numbers
First, I want to say that I very much agree with everything Greg wrote
and that udev is much better than devfs. I very much appreciate the work
getting it to where it is now.
That being said, one could argue that devfs obviates the need for
major/minor numbers altogether, making dynamic major/minor numbers moot.
That assumes that all drivers had devfs support and a correct
implementation of devfs.
I've always disliked major/minor numbers, but if that is the sole price
to pay for udev, then I don't really care :)
JE
-------------------------------------------------------
This SF.net email is sponsored by: IBM Linux Tutorials.
Become an expert in LINUX or just sharpen your skills. Sign up for IBM's
Free Linux Tutorials. Learn everything from the bash shell to sys admin.
Click now! http://ads.osdn.com/?ad_id\x1278&alloc_id371&op=click
_______________________________________________
Linux-hotplug-devel mailing list http://linux-hotplug.sourceforge.net
Linux-hotplug-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel
^ permalink raw reply [flat|nested] 19+ messages in thread* Re: udev and devfs - The final word
2003-12-31 0:29 udev and devfs - The final word Greg KH
2003-12-31 0:46 ` Johannes Erdfelt
@ 2003-12-31 0:53 ` Prakash K. Cheemplavam
2003-12-31 19:17 ` Greg KH
2004-01-01 1:18 ` Helge Hafting
` (7 subsequent siblings)
9 siblings, 1 reply; 19+ messages in thread
From: Prakash K. Cheemplavam @ 2003-12-31 0:53 UTC (permalink / raw)
To: Greg KH; +Cc: linux-hotplug-devel, linux-kernel
Greg KH wrote:
[big snip]
> All the people wanting to bring up the udev vs. devfs argument go back
> and read the previous paragraph. Yes, all Gentoo users who keep filling
> up my inbox with smoking emails, I mean you.
[yet another big snip]
Hihi, life is unfair to you. ;-) I am one of those nasty gentoo users
and still use devfs, but I want to switch asap, as I found a thread in
gentoo forums about it and furthermore tend to do experiments with my
installation. So not all gentoo users are bad users. ;-) I really
appreciate your work and hope you will find more time in developing udev
instead of wasting time (though it was quite interesting for me to read
your text) with arguing for it. So I hope when I do the transition it
goes smoothly, but even if not, I won't bash onto your head. ;-)
Cheers,
Prakash
-------------------------------------------------------
This SF.net email is sponsored by: IBM Linux Tutorials.
Become an expert in LINUX or just sharpen your skills. Sign up for IBM's
Free Linux Tutorials. Learn everything from the bash shell to sys admin.
Click now! http://ads.osdn.com/?ad_id\x1278&alloc_id371&op=click
_______________________________________________
Linux-hotplug-devel mailing list http://linux-hotplug.sourceforge.net
Linux-hotplug-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel
^ permalink raw reply [flat|nested] 19+ messages in thread* Re: udev and devfs - The final word
2003-12-31 0:53 ` Prakash K. Cheemplavam
@ 2003-12-31 19:17 ` Greg KH
2004-01-02 16:45 ` Shawn
0 siblings, 1 reply; 19+ messages in thread
From: Greg KH @ 2003-12-31 19:17 UTC (permalink / raw)
To: Prakash K. Cheemplavam; +Cc: linux-hotplug-devel, linux-kernel
On Wed, Dec 31, 2003 at 01:53:55AM +0100, Prakash K. Cheemplavam wrote:
> Greg KH wrote:
>
> [big snip]
> > All the people wanting to bring up the udev vs. devfs argument go back
> > and read the previous paragraph. Yes, all Gentoo users who keep filling
> > up my inbox with smoking emails, I mean you.
> [yet another big snip]
>
> Hihi, life is unfair to you. ;-) I am one of those nasty gentoo users
> and still use devfs, but I want to switch asap, as I found a thread in
> gentoo forums about it and furthermore tend to do experiments with my
> installation. So not all gentoo users are bad users. ;-) I really
> appreciate your work and hope you will find more time in developing udev
> instead of wasting time (though it was quite interesting for me to read
> your text) with arguing for it. So I hope when I do the transition it
> goes smoothly, but even if not, I won't bash onto your head. ;-)
Thanks, I have gotten a lot of response to this message from Gentoo
users appologizing for the "bad seeds". By no means did I mean to
disparage all Gentoo users, just the ones that keep bothering me with
this pointless argument.
In fact, now that I know Gentoo works without devfs, I'm considering
putting it on an old laptop I have around here...
thanks,
greg k-h
-------------------------------------------------------
This SF.net email is sponsored by: IBM Linux Tutorials.
Become an expert in LINUX or just sharpen your skills. Sign up for IBM's
Free Linux Tutorials. Learn everything from the bash shell to sys admin.
Click now! http://ads.osdn.com/?ad_id\x1278&alloc_id371&op=click
_______________________________________________
Linux-hotplug-devel mailing list http://linux-hotplug.sourceforge.net
Linux-hotplug-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel
^ permalink raw reply [flat|nested] 19+ messages in thread
* Re: udev and devfs - The final word
2003-12-31 0:29 udev and devfs - The final word Greg KH
2003-12-31 0:46 ` Johannes Erdfelt
2003-12-31 0:53 ` Prakash K. Cheemplavam
@ 2004-01-01 1:18 ` Helge Hafting
2004-01-03 5:59 ` Greg KH
2004-03-29 15:38 ` Shawn
` (6 subsequent siblings)
9 siblings, 1 reply; 19+ messages in thread
From: Helge Hafting @ 2004-01-01 1:18 UTC (permalink / raw)
To: Greg KH; +Cc: linux-hotplug-devel, linux-kernel
On Tue, Dec 30, 2003 at 04:29:42PM -0800, Greg KH wrote:
>
> 2) We are (well, were) running out of major and minor numbers for
> devices.
devfs tried to fix this one by _getting rid_ of those numbers.
Seriously - what are they needed for?
(Yes, I know why they're needed with /dev on ext2)
Opening a device in devfs went straight to the device from the
inode - no extra lookup of "device numbers"
Numbers were provided mostly for backward compatibility - they
weren't used for the main task of accessing devices.
udev has many other advantages of course, too bad we still
have to carry those numbers around.
Helge Hafting
-------------------------------------------------------
This SF.net email is sponsored by: IBM Linux Tutorials.
Become an expert in LINUX or just sharpen your skills. Sign up for IBM's
Free Linux Tutorials. Learn everything from the bash shell to sys admin.
Click now! http://ads.osdn.com/?ad_id\x1278&alloc_id371&op=click
_______________________________________________
Linux-hotplug-devel mailing list http://linux-hotplug.sourceforge.net
Linux-hotplug-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel
^ permalink raw reply [flat|nested] 19+ messages in thread* Re: udev and devfs - The final word
2004-01-01 1:18 ` Helge Hafting
@ 2004-01-03 5:59 ` Greg KH
2004-01-03 15:22 ` Helge Hafting
[not found] ` <20040103140140.3b848e9f.witukind@nsbm.kicks-ass.org>
0 siblings, 2 replies; 19+ messages in thread
From: Greg KH @ 2004-01-03 5:59 UTC (permalink / raw)
To: Helge Hafting; +Cc: linux-hotplug-devel, linux-kernel
On Thu, Jan 01, 2004 at 02:18:55AM +0100, Helge Hafting wrote:
> On Tue, Dec 30, 2003 at 04:29:42PM -0800, Greg KH wrote:
> >
> > 2) We are (well, were) running out of major and minor numbers for
> > devices.
>
> devfs tried to fix this one by _getting rid_ of those numbers.
> Seriously - what are they needed for?
But devfs failed in this. The devfs kernel interface still requires a
major/minor number to create device nodes.
Hopefully I can work on fixing this up in 2.7.
thanks,
greg k-h
-------------------------------------------------------
This SF.net email is sponsored by: IBM Linux Tutorials.
Become an expert in LINUX or just sharpen your skills. Sign up for IBM's
Free Linux Tutorials. Learn everything from the bash shell to sys admin.
Click now! http://ads.osdn.com/?ad_id\x1278&alloc_id371&op=click
_______________________________________________
Linux-hotplug-devel mailing list http://linux-hotplug.sourceforge.net
Linux-hotplug-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel
^ permalink raw reply [flat|nested] 19+ messages in thread* Re: udev and devfs - The final word
2004-01-03 5:59 ` Greg KH
@ 2004-01-03 15:22 ` Helge Hafting
2004-01-03 21:18 ` viro
2004-01-03 22:11 ` Greg KH
[not found] ` <20040103140140.3b848e9f.witukind@nsbm.kicks-ass.org>
1 sibling, 2 replies; 19+ messages in thread
From: Helge Hafting @ 2004-01-03 15:22 UTC (permalink / raw)
To: Greg KH; +Cc: linux-hotplug-devel, linux-kernel
On Fri, Jan 02, 2004 at 09:59:38PM -0800, Greg KH wrote:
> On Thu, Jan 01, 2004 at 02:18:55AM +0100, Helge Hafting wrote:
> > On Tue, Dec 30, 2003 at 04:29:42PM -0800, Greg KH wrote:
> > >
> > > 2) We are (well, were) running out of major and minor numbers for
> > > devices.
> >
> > devfs tried to fix this one by _getting rid_ of those numbers.
> > Seriously - what are they needed for?
>
> But devfs failed in this. The devfs kernel interface still requires a
> major/minor number to create device nodes.
>
Yes. The numbers went unused in the common case of opening a device by name though.
> Hopefully I can work on fixing this up in 2.7.
Interesting - how do you plan to do this?
There must be some connection from device node to driver. Devfs had
a pointer in the inode. The old way has numbers, and spend time on
a search.
Are you considering a sort of "minimal devfs" managed by udev?
Helge Hafting
-------------------------------------------------------
This SF.net email is sponsored by: IBM Linux Tutorials.
Become an expert in LINUX or just sharpen your skills. Sign up for IBM's
Free Linux Tutorials. Learn everything from the bash shell to sys admin.
Click now! http://ads.osdn.com/?ad_id\x1278&alloc_id371&op=click
_______________________________________________
Linux-hotplug-devel mailing list http://linux-hotplug.sourceforge.net
Linux-hotplug-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel
^ permalink raw reply [flat|nested] 19+ messages in thread* Re: udev and devfs - The final word
2004-01-03 15:22 ` Helge Hafting
@ 2004-01-03 21:18 ` viro
2004-01-03 22:11 ` Greg KH
1 sibling, 0 replies; 19+ messages in thread
From: viro @ 2004-01-03 21:18 UTC (permalink / raw)
To: Helge Hafting; +Cc: Greg KH, linux-hotplug-devel, linux-kernel
On Sat, Jan 03, 2004 at 04:22:41PM +0100, Helge Hafting wrote:
> On Fri, Jan 02, 2004 at 09:59:38PM -0800, Greg KH wrote:
> > On Thu, Jan 01, 2004 at 02:18:55AM +0100, Helge Hafting wrote:
> > > On Tue, Dec 30, 2003 at 04:29:42PM -0800, Greg KH wrote:
> > > >
> > > > 2) We are (well, were) running out of major and minor numbers for
> > > > devices.
> > >
> > > devfs tried to fix this one by _getting rid_ of those numbers.
> > > Seriously - what are they needed for?
> >
> > But devfs failed in this. The devfs kernel interface still requires a
> > major/minor number to create device nodes.
> >
> Yes. The numbers went unused in the common case of opening a device by name though.
No, they were not. RTFS, please.
-------------------------------------------------------
This SF.net email is sponsored by: IBM Linux Tutorials.
Become an expert in LINUX or just sharpen your skills. Sign up for IBM's
Free Linux Tutorials. Learn everything from the bash shell to sys admin.
Click now! http://ads.osdn.com/?ad_id\x1278&alloc_id371&op=click
_______________________________________________
Linux-hotplug-devel mailing list http://linux-hotplug.sourceforge.net
Linux-hotplug-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel
^ permalink raw reply [flat|nested] 19+ messages in thread
* Re: udev and devfs - The final word
2004-01-03 15:22 ` Helge Hafting
2004-01-03 21:18 ` viro
@ 2004-01-03 22:11 ` Greg KH
1 sibling, 0 replies; 19+ messages in thread
From: Greg KH @ 2004-01-03 22:11 UTC (permalink / raw)
To: Helge Hafting; +Cc: linux-hotplug-devel, linux-kernel
On Sat, Jan 03, 2004 at 04:22:41PM +0100, Helge Hafting wrote:
> > Hopefully I can work on fixing this up in 2.7.
>
> Interesting - how do you plan to do this?
Probably something like the current interface for USB minor numbers when
CONFIG_USB_DYNAMIC_MINORS is enabled. The drivers will request a
certian major/minor, but the kernel will just give it whatever it feels
like.
That's my first guess, actual implementation will probably differ wildly
:)
thanks,
greg k-h
-------------------------------------------------------
This SF.net email is sponsored by: IBM Linux Tutorials.
Become an expert in LINUX or just sharpen your skills. Sign up for IBM's
Free Linux Tutorials. Learn everything from the bash shell to sys admin.
Click now! http://ads.osdn.com/?ad_id\x1278&alloc_id371&op=click
_______________________________________________
Linux-hotplug-devel mailing list http://linux-hotplug.sourceforge.net
Linux-hotplug-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel
^ permalink raw reply [flat|nested] 19+ messages in thread
[parent not found: <20040103140140.3b848e9f.witukind@nsbm.kicks-ass.org>]
* Re: udev and devfs - The final word
[not found] ` <20040103140140.3b848e9f.witukind@nsbm.kicks-ass.org>
@ 2004-01-03 22:16 ` Greg KH
2004-01-03 22:33 ` Christoph Hellwig
0 siblings, 1 reply; 19+ messages in thread
From: Greg KH @ 2004-01-03 22:16 UTC (permalink / raw)
To: Witukind; +Cc: linux-kernel, linux-hotplug-devel
On Sat, Jan 03, 2004 at 02:01:40PM +0100, Witukind wrote:
> On Fri, 2 Jan 2004 21:59:38 -0800
> Greg KH <greg@kroah.com> wrote:
>
> > On Thu, Jan 01, 2004 at 02:18:55AM +0100, Helge Hafting wrote:
> > > On Tue, Dec 30, 2003 at 04:29:42PM -0800, Greg KH wrote:
> > > >
> > > > 2) We are (well, were) running out of major and minor numbers for
> > > > devices.
> > >
> > > devfs tried to fix this one by _getting rid_ of those numbers.
> > > Seriously - what are they needed for?
> >
> > But devfs failed in this. The devfs kernel interface still requires a
> > major/minor number to create device nodes.
>
> Let's be more precise and not say that "devfs" failed this, but that the
> current implementation of devfs failed this.
Um, that's all we have to go by right now, sorry.
> If devfs works good on FreeBSD, it probably means that the current
> devfs for Linux is badly designed, not that the idea of devfs is bad.
I have no idea how FreeBSD implemented devfs.
If you know how FreeBSD implemented devfs, and how it solves all of the
problems that I detailed in my original posting, I would be interested.
thanks,
greg k-h
-------------------------------------------------------
This SF.net email is sponsored by: IBM Linux Tutorials.
Become an expert in LINUX or just sharpen your skills. Sign up for IBM's
Free Linux Tutorials. Learn everything from the bash shell to sys admin.
Click now! http://ads.osdn.com/?ad_id\x1278&alloc_id371&op=click
_______________________________________________
Linux-hotplug-devel mailing list http://linux-hotplug.sourceforge.net
Linux-hotplug-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel
^ permalink raw reply [flat|nested] 19+ messages in thread* Re: udev and devfs - The final word
2004-01-03 22:16 ` Greg KH
@ 2004-01-03 22:33 ` Christoph Hellwig
0 siblings, 0 replies; 19+ messages in thread
From: Christoph Hellwig @ 2004-01-03 22:33 UTC (permalink / raw)
To: Greg KH; +Cc: Witukind, linux-kernel, linux-hotplug-devel
On Sat, Jan 03, 2004 at 02:16:04PM -0800, Greg KH wrote:
> > If devfs works good on FreeBSD, it probably means that the current
> > devfs for Linux is badly designed, not that the idea of devfs is bad.
>
> I have no idea how FreeBSD implemented devfs.
>
> If you know how FreeBSD implemented devfs, and how it solves all of the
> problems that I detailed in my original posting, I would be interested.
The FreeBSD implementation is pretty similar to the devfs we have in 2.6
API- and implementation wise. Just because it works somehow in most
situation doesn't mean it's right..
-------------------------------------------------------
This SF.net email is sponsored by: IBM Linux Tutorials.
Become an expert in LINUX or just sharpen your skills. Sign up for IBM's
Free Linux Tutorials. Learn everything from the bash shell to sys admin.
Click now! http://ads.osdn.com/?ad_id\x1278&alloc_id371&op=click
_______________________________________________
Linux-hotplug-devel mailing list http://linux-hotplug.sourceforge.net
Linux-hotplug-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel
^ permalink raw reply [flat|nested] 19+ messages in thread
* Re: udev and devfs - The final word
2003-12-31 0:29 udev and devfs - The final word Greg KH
` (2 preceding siblings ...)
2004-01-01 1:18 ` Helge Hafting
@ 2004-03-29 15:38 ` Shawn
2004-03-29 15:39 ` Greg KH
` (5 subsequent siblings)
9 siblings, 0 replies; 19+ messages in thread
From: Shawn @ 2004-03-29 15:38 UTC (permalink / raw)
To: linux-hotplug
On Wed, 2003-12-31 at 13:17, Greg KH wrote:
> In fact, now that I know Gentoo works without devfs, I'm considering
> putting it on an old laptop I have around here...
If you use an "old" laptop you might want to use the distcc option... ;)
Unless you like you installs to take three weeks... Literally.
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
-------------------------------------------------------
This SF.Net email is sponsored by: IBM Linux Tutorials
Free Linux tutorial presented by Daniel Robbins, President and CEO of
GenToo technologies. Learn everything from fundamentals to system
administration.http://ads.osdn.com/?ad_id\x1470&alloc_id638&op=click
_______________________________________________
Linux-hotplug-devel mailing list http://linux-hotplug.sourceforge.net
Linux-hotplug-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel
^ permalink raw reply [flat|nested] 19+ messages in thread* Re: udev and devfs - The final word
2003-12-31 0:29 udev and devfs - The final word Greg KH
` (3 preceding siblings ...)
2004-03-29 15:38 ` Shawn
@ 2004-03-29 15:39 ` Greg KH
2004-03-29 15:40 ` Helge Hafting
` (4 subsequent siblings)
9 siblings, 0 replies; 19+ messages in thread
From: Greg KH @ 2004-03-29 15:39 UTC (permalink / raw)
To: linux-hotplug
On Thu, Jan 01, 2004 at 02:18:55AM +0100, Helge Hafting wrote:
> On Tue, Dec 30, 2003 at 04:29:42PM -0800, Greg KH wrote:
> >
> > 2) We are (well, were) running out of major and minor numbers for
> > devices.
>
> devfs tried to fix this one by _getting rid_ of those numbers.
> Seriously - what are they needed for?
But devfs failed in this. The devfs kernel interface still requires a
major/minor number to create device nodes.
Hopefully I can work on fixing this up in 2.7.
thanks,
greg k-h
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
-------------------------------------------------------
This SF.Net email is sponsored by: IBM Linux Tutorials
Free Linux tutorial presented by Daniel Robbins, President and CEO of
GenToo technologies. Learn everything from fundamentals to system
administration.http://ads.osdn.com/?ad_id\x1470&alloc_id638&op=click
_______________________________________________
Linux-hotplug-devel mailing list http://linux-hotplug.sourceforge.net
Linux-hotplug-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel
^ permalink raw reply [flat|nested] 19+ messages in thread* Re: udev and devfs - The final word
2003-12-31 0:29 udev and devfs - The final word Greg KH
` (4 preceding siblings ...)
2004-03-29 15:39 ` Greg KH
@ 2004-03-29 15:40 ` Helge Hafting
2004-03-29 15:40 ` viro
` (3 subsequent siblings)
9 siblings, 0 replies; 19+ messages in thread
From: Helge Hafting @ 2004-03-29 15:40 UTC (permalink / raw)
To: linux-hotplug
On Fri, Jan 02, 2004 at 09:59:38PM -0800, Greg KH wrote:
> On Thu, Jan 01, 2004 at 02:18:55AM +0100, Helge Hafting wrote:
> > On Tue, Dec 30, 2003 at 04:29:42PM -0800, Greg KH wrote:
> > >
> > > 2) We are (well, were) running out of major and minor numbers for
> > > devices.
> >
> > devfs tried to fix this one by _getting rid_ of those numbers.
> > Seriously - what are they needed for?
>
> But devfs failed in this. The devfs kernel interface still requires a
> major/minor number to create device nodes.
>
Yes. The numbers went unused in the common case of opening a device by name though.
> Hopefully I can work on fixing this up in 2.7.
Interesting - how do you plan to do this?
There must be some connection from device node to driver. Devfs had
a pointer in the inode. The old way has numbers, and spend time on
a search.
Are you considering a sort of "minimal devfs" managed by udev?
Helge Hafting
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
-------------------------------------------------------
This SF.Net email is sponsored by: IBM Linux Tutorials
Free Linux tutorial presented by Daniel Robbins, President and CEO of
GenToo technologies. Learn everything from fundamentals to system
administration.http://ads.osdn.com/?ad_id\x1470&alloc_id638&op=click
_______________________________________________
Linux-hotplug-devel mailing list http://linux-hotplug.sourceforge.net
Linux-hotplug-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel
^ permalink raw reply [flat|nested] 19+ messages in thread* Re: udev and devfs - The final word
2003-12-31 0:29 udev and devfs - The final word Greg KH
` (5 preceding siblings ...)
2004-03-29 15:40 ` Helge Hafting
@ 2004-03-29 15:40 ` viro
2004-03-29 15:40 ` Greg KH
` (2 subsequent siblings)
9 siblings, 0 replies; 19+ messages in thread
From: viro @ 2004-03-29 15:40 UTC (permalink / raw)
To: linux-hotplug
On Sat, Jan 03, 2004 at 04:22:41PM +0100, Helge Hafting wrote:
> On Fri, Jan 02, 2004 at 09:59:38PM -0800, Greg KH wrote:
> > On Thu, Jan 01, 2004 at 02:18:55AM +0100, Helge Hafting wrote:
> > > On Tue, Dec 30, 2003 at 04:29:42PM -0800, Greg KH wrote:
> > > >
> > > > 2) We are (well, were) running out of major and minor numbers for
> > > > devices.
> > >
> > > devfs tried to fix this one by _getting rid_ of those numbers.
> > > Seriously - what are they needed for?
> >
> > But devfs failed in this. The devfs kernel interface still requires a
> > major/minor number to create device nodes.
> >
> Yes. The numbers went unused in the common case of opening a device by name though.
No, they were not. RTFS, please.
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
-------------------------------------------------------
This SF.Net email is sponsored by: IBM Linux Tutorials
Free Linux tutorial presented by Daniel Robbins, President and CEO of
GenToo technologies. Learn everything from fundamentals to system
administration.http://ads.osdn.com/?ad_id\x1470&alloc_id638&op=click
_______________________________________________
Linux-hotplug-devel mailing list http://linux-hotplug.sourceforge.net
Linux-hotplug-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel
^ permalink raw reply [flat|nested] 19+ messages in thread* Re: udev and devfs - The final word
2003-12-31 0:29 udev and devfs - The final word Greg KH
` (6 preceding siblings ...)
2004-03-29 15:40 ` viro
@ 2004-03-29 15:40 ` Greg KH
2004-03-29 15:40 ` Greg KH
2004-03-29 15:40 ` Christoph Hellwig
9 siblings, 0 replies; 19+ messages in thread
From: Greg KH @ 2004-03-29 15:40 UTC (permalink / raw)
To: linux-hotplug
On Sat, Jan 03, 2004 at 02:01:40PM +0100, Witukind wrote:
> On Fri, 2 Jan 2004 21:59:38 -0800
> Greg KH <greg@kroah.com> wrote:
>
> > On Thu, Jan 01, 2004 at 02:18:55AM +0100, Helge Hafting wrote:
> > > On Tue, Dec 30, 2003 at 04:29:42PM -0800, Greg KH wrote:
> > > >
> > > > 2) We are (well, were) running out of major and minor numbers for
> > > > devices.
> > >
> > > devfs tried to fix this one by _getting rid_ of those numbers.
> > > Seriously - what are they needed for?
> >
> > But devfs failed in this. The devfs kernel interface still requires a
> > major/minor number to create device nodes.
>
> Let's be more precise and not say that "devfs" failed this, but that the
> current implementation of devfs failed this.
Um, that's all we have to go by right now, sorry.
> If devfs works good on FreeBSD, it probably means that the current
> devfs for Linux is badly designed, not that the idea of devfs is bad.
I have no idea how FreeBSD implemented devfs.
If you know how FreeBSD implemented devfs, and how it solves all of the
problems that I detailed in my original posting, I would be interested.
thanks,
greg k-h
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
-------------------------------------------------------
This SF.Net email is sponsored by: IBM Linux Tutorials
Free Linux tutorial presented by Daniel Robbins, President and CEO of
GenToo technologies. Learn everything from fundamentals to system
administration.http://ads.osdn.com/?ad_id\x1470&alloc_id638&op=click
_______________________________________________
Linux-hotplug-devel mailing list http://linux-hotplug.sourceforge.net
Linux-hotplug-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel
^ permalink raw reply [flat|nested] 19+ messages in thread* Re: udev and devfs - The final word
2003-12-31 0:29 udev and devfs - The final word Greg KH
` (7 preceding siblings ...)
2004-03-29 15:40 ` Greg KH
@ 2004-03-29 15:40 ` Greg KH
2004-03-29 15:40 ` Christoph Hellwig
9 siblings, 0 replies; 19+ messages in thread
From: Greg KH @ 2004-03-29 15:40 UTC (permalink / raw)
To: linux-hotplug
On Sat, Jan 03, 2004 at 04:22:41PM +0100, Helge Hafting wrote:
> > Hopefully I can work on fixing this up in 2.7.
>
> Interesting - how do you plan to do this?
Probably something like the current interface for USB minor numbers when
CONFIG_USB_DYNAMIC_MINORS is enabled. The drivers will request a
certian major/minor, but the kernel will just give it whatever it feels
like.
That's my first guess, actual implementation will probably differ wildly
:)
thanks,
greg k-h
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
-------------------------------------------------------
This SF.Net email is sponsored by: IBM Linux Tutorials
Free Linux tutorial presented by Daniel Robbins, President and CEO of
GenToo technologies. Learn everything from fundamentals to system
administration.http://ads.osdn.com/?ad_id\x1470&alloc_id638&op=click
_______________________________________________
Linux-hotplug-devel mailing list http://linux-hotplug.sourceforge.net
Linux-hotplug-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel
^ permalink raw reply [flat|nested] 19+ messages in thread* Re: udev and devfs - The final word
2003-12-31 0:29 udev and devfs - The final word Greg KH
` (8 preceding siblings ...)
2004-03-29 15:40 ` Greg KH
@ 2004-03-29 15:40 ` Christoph Hellwig
9 siblings, 0 replies; 19+ messages in thread
From: Christoph Hellwig @ 2004-03-29 15:40 UTC (permalink / raw)
To: linux-hotplug
On Sat, Jan 03, 2004 at 02:16:04PM -0800, Greg KH wrote:
> > If devfs works good on FreeBSD, it probably means that the current
> > devfs for Linux is badly designed, not that the idea of devfs is bad.
>
> I have no idea how FreeBSD implemented devfs.
>
> If you know how FreeBSD implemented devfs, and how it solves all of the
> problems that I detailed in my original posting, I would be interested.
The FreeBSD implementation is pretty similar to the devfs we have in 2.6
API- and implementation wise. Just because it works somehow in most
situation doesn't mean it's right..
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
-------------------------------------------------------
This SF.Net email is sponsored by: IBM Linux Tutorials
Free Linux tutorial presented by Daniel Robbins, President and CEO of
GenToo technologies. Learn everything from fundamentals to system
administration.http://ads.osdn.com/?ad_id\x1470&alloc_id638&op=click
_______________________________________________
Linux-hotplug-devel mailing list http://linux-hotplug.sourceforge.net
Linux-hotplug-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel
^ permalink raw reply [flat|nested] 19+ messages in thread
end of thread, other threads:[~2004-03-29 15:40 UTC | newest]
Thread overview: 19+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2003-12-31 0:29 udev and devfs - The final word Greg KH
2003-12-31 0:46 ` Johannes Erdfelt
2003-12-31 0:53 ` Prakash K. Cheemplavam
2003-12-31 19:17 ` Greg KH
2004-01-02 16:45 ` Shawn
2004-01-01 1:18 ` Helge Hafting
2004-01-03 5:59 ` Greg KH
2004-01-03 15:22 ` Helge Hafting
2004-01-03 21:18 ` viro
2004-01-03 22:11 ` Greg KH
[not found] ` <20040103140140.3b848e9f.witukind@nsbm.kicks-ass.org>
2004-01-03 22:16 ` Greg KH
2004-01-03 22:33 ` Christoph Hellwig
2004-03-29 15:38 ` Shawn
2004-03-29 15:39 ` Greg KH
2004-03-29 15:40 ` Helge Hafting
2004-03-29 15:40 ` viro
2004-03-29 15:40 ` Greg KH
2004-03-29 15:40 ` Greg KH
2004-03-29 15:40 ` Christoph Hellwig
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).