Mailing List Archive

devfs is dead, let's move on
Ok, now that devfs is removed from the 2.6 kernel tree[1], I think it's
time to start to revisit some of the /dev naming rules that we currently
are living with[2].

To start with, the 061 version of udev offers a big memory savings if
you use the "default" kernel name of a device[3]. If you do that, it does
not create a file in its database in /dev/.udevdb/

If we can move away from some of our devfs-like names, we stand to
reclaim a lot of memory from everyone's machines. As an example, if we
drop all of the tty/pts/vc/vcc symlinks, and just go with the default
kernel name, we save 2.5Mb of space in tempfs/ramfs. I've done this on
my machines and everything seems to work just fine (it looks like
everything that was trying to use a tty node was just using the symlink
anyway.)

So, anyone have any objections to me changing the default udev naming
scheme in this manner?

Next up, that loony block device naming scheme (more on that later...)

thanks,

greg k-h

[1] Yes, 2.6.13-rc1 does not offer devfs as a kernel option anymore, but
the code is still present if you know how to enable the option and
rebuild your kernel with it. I'll be working on killing it for good
by, at the latest, 2.6.14.

[2] devfs vs. udev flames will dutifully be ignored. Give up, it will do
You no good to argue.

[3] HAL needs a patch to be able to handle this. It's posted on the
hal development mailing lists and will be checked in real-soon-now.
--
gentoo-dev@gentoo.org mailing list
Re: devfs is dead, let's move on [ In reply to ]
On Wed, Jul 06, 2005 at 03:46:51PM -0700, Greg KH wrote:
> [3] HAL needs a patch to be able to handle this. It's posted on the
> hal development mailing lists and will be checked in real-soon-now.

Here it is, if any of the "Gentopia" developers want to add it to our
package:
http://lists.freedesktop.org/archives/hal/2005-July/002683.html

thanks,

greg k-h
--
gentoo-dev@gentoo.org mailing list
Re: devfs is dead, let's move on [ In reply to ]
On Wed, 2005-07-06 at 15:46 -0700, Greg KH wrote:
> Ok, now that devfs is removed from the 2.6 kernel tree[1], I think it's
> time to start to revisit some of the /dev naming rules that we currently
> are living with[2].
>

> [2] devfs vs. udev flames will dutifully be ignored. Give up, it will do
> You no good to argue.

My understanding was that we still support old 2.2 kernels for SPARC
users as eradictor (iirc) posted a patch that only allowed iproute2
support if the kernel supported it. 2.6 kernels support it by default -
were require /proc/net/netlink for iproute2.

baselayout supports (and probably will indefinitely) ifconfig/net-tools
et all

This has absolutely zero to do with udev, but the point is that devfs vs
udev "flames" cannot be ignored until non udev supported kernels from
all arches are removed from the tree.

SPARC may have udev supported kernels supported now - I don't know. But
what I do know is that we have to support the lowest thing we have.

Thanks

Roy

--
gentoo-dev@gentoo.org mailing list
Re: devfs is dead, let's move on [ In reply to ]
On Thu, Jul 07, 2005 at 12:06:04AM +0100, Roy Marples wrote:
>
> This has absolutely zero to do with udev, but the point is that devfs vs
> udev "flames" cannot be ignored until non udev supported kernels from
> all arches are removed from the tree.

It also has nothing to do with the naming scheme we use in /dev, as the
network stuff you mention don't care about /dev, right?

So, changing the udev naming scheme should not break SPARC, as I am
trying to migrate back to the standard LSB naming scheme.

After we get there, then I'll add the persistant naming symlinks that
it's looking like all distros are going to be agreeing apon in a few
months...

thanks,

greg k-h
--
gentoo-dev@gentoo.org mailing list
Re: devfs is dead, let's move on [ In reply to ]
On Wednesday 06 July 2005 07:06 pm, Roy Marples wrote:
> On Wed, 2005-07-06 at 15:46 -0700, Greg KH wrote:
> > Ok, now that devfs is removed from the 2.6 kernel tree[1], I think it's
> > time to start to revisit some of the /dev naming rules that we currently
> > are living with[2].
> >
> >
> > [2] devfs vs. udev flames will dutifully be ignored. Give up, it will do
> > You no good to argue.
>
> My understanding was that we still support old 2.2 kernels for SPARC
> users as eradictor (iirc) posted a patch that only allowed iproute2
> support if the kernel supported it. 2.6 kernels support it by default -
> were require /proc/net/netlink for iproute2.

and eventually i'd like to get m68k into the 2.2 kernels ...

> This has absolutely zero to do with udev, but the point is that devfs vs
> udev "flames" cannot be ignored until non udev supported kernels from
> all arches are removed from the tree.

i dont see how 2.2 kernels matter since they dont even support devfs ?
-mike
--
gentoo-dev@gentoo.org mailing list
Re: devfs is dead, let's move on [ In reply to ]
On Wed, 2005-07-06 at 15:46 -0700, Greg KH wrote:
> So, anyone have any objections to me changing the default udev naming
> scheme in this manner?

I'm all for the move - I always disable the devfs naming scheme in udev
anyways.

> Next up, that loony block device naming scheme (more on that later...)

W00t :)

./Brix
--
Henrik Brix Andersen <brix@gentoo.org>
Gentoo Metadistribution | Mobile computing herd
Re: devfs is dead, let's move on [ In reply to ]
On Wed, 2005-07-06 at 15:46 -0700, Greg KH wrote:
> Ok, now that devfs is removed from the 2.6 kernel tree[1], I think it's
> time to start to revisit some of the /dev naming rules that we currently
> are living with[2].
>
> To start with, the 061 version of udev offers a big memory savings if
> you use the "default" kernel name of a device[3]. If you do that, it does
> not create a file in its database in /dev/.udevdb/
>
> If we can move away from some of our devfs-like names, we stand to
> reclaim a lot of memory from everyone's machines. As an example, if we
> drop all of the tty/pts/vc/vcc symlinks, and just go with the default
> kernel name, we save 2.5Mb of space in tempfs/ramfs. I've done this on
> my machines and everything seems to work just fine (it looks like
> everything that was trying to use a tty node was just using the symlink
> anyway.)
>
> So, anyone have any objections to me changing the default udev naming
> scheme in this manner?
>

Fine with me. I assume we will need to keep the rcscript support for
those die-hard 2.4 users still, but hopefully we can eventually drop
that as well.

> Next up, that loony block device naming scheme (more on that later...)
>

Heh. I hope that we will still at least just do the cdsymlinks stuff
(just the /dev/cdrom, /dev/dvd, etc stuff) as that do make things a bit
easier for multimedia stuff.


> [3] HAL needs a patch to be able to handle this. It's posted on the
> hal development mailing lists and will be checked in real-soon-now.

I just think we need to make sure this is in first ...


Lastly on an unrelated note ... I have a rule:

-----
# cat /etc/udev/rules.d/40-dm.rules
KERNEL="dm-[0-9]*", PROGRAM="/sbin/devmap_name %M %m", NAME="mapper/%c", SYMLINK="%c"
-----

And in theory it should be the last rule to set the name ... however the
default one in 50-udev.rules overrides it, and I have to add
OPTIONS="last_rule"

--- (default rule) ---
KERNEL="dm-[0-9]*", NAME=""
----------------------

I am assuming (without having looked at the code) that because NAME is
set to "", whatever code that should drop it as it have NAME, does not
kick in?


Thanks,

--
Martin Schlemmer
Gentoo Linux Developer, Desktop/System Team Developer
Cape Town, South Africa
Re: devfs is dead, let's move on [ In reply to ]
On Wed, 2005-07-06 at 15:46 -0700, Greg KH wrote:
> To start with, the 061 version of udev offers a big memory savings if
> you use the "default" kernel name of a device[3]. If you do that, it does
> not create a file in its database in /dev/.udevdb/

So if we were to switch to udev 061 in genkernel, it would shrink memory
usage in our initrd/initramfs, provided we made everything use the LSB
device names/nodes, versus the devfs ones, correct?

> If we can move away from some of our devfs-like names, we stand to
> reclaim a lot of memory from everyone's machines. As an example, if we
> drop all of the tty/pts/vc/vcc symlinks, and just go with the default
> kernel name, we save 2.5Mb of space in tempfs/ramfs. I've done this on
> my machines and everything seems to work just fine (it looks like
> everything that was trying to use a tty node was just using the symlink
> anyway.)
>
> So, anyone have any objections to me changing the default udev naming
> scheme in this manner?

None here. Anything that gives us more usable RAM even after we've
snatched some for the initrd and for /dev and for the tmpfs of the
LiveCD/InstallCD is fine by me.

--
Chris Gianelloni
Release Engineering - Strategic Lead/QA Manager
Games - Developer
Gentoo Linux
Re: devfs is dead, let's move on [ In reply to ]
maillog: 06/07/2005-15:46:51(-0700): Greg KH types
> Ok, now that devfs is removed from the 2.6 kernel tree[1], I think it's
> time to start to revisit some of the /dev naming rules that we currently
> are living with[2].
>
> To start with, the 061 version of udev offers a big memory savings if
> you use the "default" kernel name of a device[3]. If you do that, it does
> not create a file in its database in /dev/.udevdb/

Ah, that will break /etc/init.d/halt.sh

Particularly the stuff around here:

ebegin "Saving device nodes"
...
cd /dev
# Find all devices
find . -xdev -type b -or -type c -or -type l | cut -d/ -f2- > \
"${devices_real}"
# Figure out what udev created
eval $(grep '^[[:space:]]*udev_db=' /etc/udev/udev.conf)
if [[ -d ${udev_db} ]]; then
# New udev_db is clear text ...
udevinfo=$(cat "${udev_db}"/*)
else
# Old one is not ...
udevinfo=$(udevinfo -d)
fi
# This basically strips 'S:' and 'N:' from the db output, and then
# print all the nodes/symlinks udev created ...
...

The script will be unable to figure out what device is being handled by
udev, and what is not.

--
| Georgi Georgiev | I read the newspaper avidly. It is my one |
| chutz@gg3.net | form of continuous fiction. -- Aneurin |
| +81(90)2877-8845 | Bevan |
--
gentoo-dev@gentoo.org mailing list
Re: devfs is dead, let's move on [ In reply to ]
On Wed, 2005-07-06 at 15:46 -0700, Greg KH wrote:
> If we can move away from some of our devfs-like names, we stand to
> reclaim a lot of memory from everyone's machines. As an example, if we
> drop all of the tty/pts/vc/vcc symlinks, and just go with the default
> kernel name, we save 2.5Mb of space in tempfs/ramfs. I've done this on
> my machines and everything seems to work just fine (it looks like
> everything that was trying to use a tty node was just using the symlink
> anyway.)
>
> So, anyone have any objections to me changing the default udev naming
> scheme in this manner?

No objections here. I've been waiting fort his move for a little while
now. The only real problems will be with those 2.4 (devfs) users who
refuse to move, maybe this is good enough incentive.
Re: Re: devfs is dead, let's move on [ In reply to ]
On Thu, 2005-07-07 at 12:44 -0700, Duncan wrote:
> Martin Schlemmer posted <1120744545.6560.18.camel@lycan.lan>, excerpted
> below, on Thu, 07 Jul 2005 15:55:45 +0200:
>
> > Lastly on an unrelated note ... I have a rule:
> >
> > -----
> > # cat /etc/udev/rules.d/40-dm.rules
> > KERNEL="dm-[0-9]*", PROGRAM="/sbin/devmap_name %M %m", NAME="mapper/%c", SYMLINK="%c"
> > -----
> >
> > And in theory it should be the last rule to set the name ... however the
> > default one in 50-udev.rules overrides it, and I have to add
> > OPTIONS="last_rule"
>
> Why would a rule applied in 40-x.rules be expected to stick when
> 50-x.rules runs after it and has a conflicting rule?
>
> Change the 40- to 60- and it should work. Of course, you are already
> using another alternative, the last_rule option.
>

According to the manpage:

-----
NAME The name of the node to be created, or the name, the network interface should be renamed to. Only
one rule can set the a name, all later rules with a NAME key will be ignored.
-----


--
Martin Schlemmer
Gentoo Linux Developer, Desktop/System Team Developer
Cape Town, South Africa
Re: devfs is dead, let's move on [ In reply to ]
On Thu, Jul 07, 2005 at 08:52:20PM +0100, John Mylchreest wrote:
> On Wed, 2005-07-06 at 15:46 -0700, Greg KH wrote:
> > If we can move away from some of our devfs-like names, we stand to
> > reclaim a lot of memory from everyone's machines. As an example, if we
> > drop all of the tty/pts/vc/vcc symlinks, and just go with the default
> > kernel name, we save 2.5Mb of space in tempfs/ramfs. I've done this on
> > my machines and everything seems to work just fine (it looks like
> > everything that was trying to use a tty node was just using the symlink
> > anyway.)
> >
> > So, anyone have any objections to me changing the default udev naming
> > scheme in this manner?
>
> No objections here. I've been waiting fort his move for a little while
> now. The only real problems will be with those 2.4 (devfs) users who
> refuse to move, maybe this is good enough incentive.

As the default devfs configuration in gentoo is to use the LSB naming
scheme, only people who will have customized their devfs configuration
would have issues.

Oh, and there seem to be some people that rely on the devfs naming
scheme for block devices in /etc/fstab, for some odd reason.

Anyway, I don't think this will break any devfs usages, they can keep
using 2.4 and devfs all they want, the rest of the world will move on :)

thanks,

greg k-h
--
gentoo-dev@gentoo.org mailing list
Re: devfs is dead, let's move on [ In reply to ]
On Thu, Jul 07, 2005 at 03:55:45PM +0200, Martin Schlemmer wrote:
> On Wed, 2005-07-06 at 15:46 -0700, Greg KH wrote:
> > Ok, now that devfs is removed from the 2.6 kernel tree[1], I think it's
> > time to start to revisit some of the /dev naming rules that we currently
> > are living with[2].
> >
> > To start with, the 061 version of udev offers a big memory savings if
> > you use the "default" kernel name of a device[3]. If you do that, it does
> > not create a file in its database in /dev/.udevdb/
> >
> > If we can move away from some of our devfs-like names, we stand to
> > reclaim a lot of memory from everyone's machines. As an example, if we
> > drop all of the tty/pts/vc/vcc symlinks, and just go with the default
> > kernel name, we save 2.5Mb of space in tempfs/ramfs. I've done this on
> > my machines and everything seems to work just fine (it looks like
> > everything that was trying to use a tty node was just using the symlink
> > anyway.)
> >
> > So, anyone have any objections to me changing the default udev naming
> > scheme in this manner?
> >
>
> Fine with me. I assume we will need to keep the rcscript support for
> those die-hard 2.4 users still, but hopefully we can eventually drop
> that as well.

What rcscript support?

> > Next up, that loony block device naming scheme (more on that later...)
> >
>
> Heh. I hope that we will still at least just do the cdsymlinks stuff
> (just the /dev/cdrom, /dev/dvd, etc stuff) as that do make things a bit
> easier for multimedia stuff.

Yes, I don't see us dropping that, as it's just too useful :)

> > [3] HAL needs a patch to be able to handle this. It's posted on the
> > hal development mailing lists and will be checked in real-soon-now.
>
> I just think we need to make sure this is in first ...

The HAL patch? It's now in HAL's cvs tree, don't know when they will do
a new release.

> Lastly on an unrelated note ... I have a rule:
>
> -----
> # cat /etc/udev/rules.d/40-dm.rules
> KERNEL="dm-[0-9]*", PROGRAM="/sbin/devmap_name %M %m", NAME="mapper/%c", SYMLINK="%c"
> -----
>
> And in theory it should be the last rule to set the name ... however the
> default one in 50-udev.rules overrides it, and I have to add
> OPTIONS="last_rule"

Yes.

Want me to just change the default rule to yours?

thanks,

greg k-h
--
gentoo-dev@gentoo.org mailing list
Re: devfs is dead, let's move on [ In reply to ]
On Thu, 2005-07-07 at 13:52 -0700, Greg KH wrote:
> On Thu, Jul 07, 2005 at 03:55:45PM +0200, Martin Schlemmer wrote:
> > On Wed, 2005-07-06 at 15:46 -0700, Greg KH wrote:
> > > Ok, now that devfs is removed from the 2.6 kernel tree[1], I think it's
> > > time to start to revisit some of the /dev naming rules that we currently
> > > are living with[2].
> > >
> > > To start with, the 061 version of udev offers a big memory savings if
> > > you use the "default" kernel name of a device[3]. If you do that, it does
> > > not create a file in its database in /dev/.udevdb/
> > >
> > > If we can move away from some of our devfs-like names, we stand to
> > > reclaim a lot of memory from everyone's machines. As an example, if we
> > > drop all of the tty/pts/vc/vcc symlinks, and just go with the default
> > > kernel name, we save 2.5Mb of space in tempfs/ramfs. I've done this on
> > > my machines and everything seems to work just fine (it looks like
> > > everything that was trying to use a tty node was just using the symlink
> > > anyway.)
> > >
> > > So, anyone have any objections to me changing the default udev naming
> > > scheme in this manner?
> > >
> >
> > Fine with me. I assume we will need to keep the rcscript support for
> > those die-hard 2.4 users still, but hopefully we can eventually drop
> > that as well.
>
> What rcscript support?
>

Err, sorry, all the crap in /sbin/rc ...

> > > Next up, that loony block device naming scheme (more on that later...)
> > >
> >

> > > [3] HAL needs a patch to be able to handle this. It's posted on the
> > > hal development mailing lists and will be checked in real-soon-now.
> >
> > I just think we need to make sure this is in first ...
>
> The HAL patch? It's now in HAL's cvs tree, don't know when they will do
> a new release.
>

Well, you did provide the patch, so hopefully foser or somebody else
will just add it. Foser ping ...

> > Lastly on an unrelated note ... I have a rule:
> >
> > -----
> > # cat /etc/udev/rules.d/40-dm.rules
> > KERNEL="dm-[0-9]*", PROGRAM="/sbin/devmap_name %M %m", NAME="mapper/%c", SYMLINK="%c"
> > -----
> >
> > And in theory it should be the last rule to set the name ... however the
> > default one in 50-udev.rules overrides it, and I have to add
> > OPTIONS="last_rule"
>
> Yes.
>
> Want me to just change the default rule to yours?
>

I do not think that will work, as that is not distributed with either
udev or device-mapper, but multipath-tools (sorda silly if you ask me,
as I think it would have been more appropriate with device-mapper, but
what the hey).

Anyhow, I'll see if I can hack a patch or something up so that NAME=""
will also be seen as as a rule that 'set the name' ....


Thanks,

--
Martin Schlemmer
Gentoo Linux Developer, Desktop/System Team Developer
Cape Town, South Africa
Re: devfs is dead, let's move on [ In reply to ]
On Fri, Jul 08, 2005 at 01:22:24AM +0200, Martin Schlemmer wrote:
> On Thu, 2005-07-07 at 13:52 -0700, Greg KH wrote:
> > On Thu, Jul 07, 2005 at 03:55:45PM +0200, Martin Schlemmer wrote:
> > > On Wed, 2005-07-06 at 15:46 -0700, Greg KH wrote:
> > > > Ok, now that devfs is removed from the 2.6 kernel tree[1], I think it's
> > > > time to start to revisit some of the /dev naming rules that we currently
> > > > are living with[2].
> > > >
> > > > To start with, the 061 version of udev offers a big memory savings if
> > > > you use the "default" kernel name of a device[3]. If you do that, it does
> > > > not create a file in its database in /dev/.udevdb/
> > > >
> > > > If we can move away from some of our devfs-like names, we stand to
> > > > reclaim a lot of memory from everyone's machines. As an example, if we
> > > > drop all of the tty/pts/vc/vcc symlinks, and just go with the default
> > > > kernel name, we save 2.5Mb of space in tempfs/ramfs. I've done this on
> > > > my machines and everything seems to work just fine (it looks like
> > > > everything that was trying to use a tty node was just using the symlink
> > > > anyway.)
> > > >
> > > > So, anyone have any objections to me changing the default udev naming
> > > > scheme in this manner?
> > > >
> > >
> > > Fine with me. I assume we will need to keep the rcscript support for
> > > those die-hard 2.4 users still, but hopefully we can eventually drop
> > > that as well.
> >
> > What rcscript support?
> >
>
> Err, sorry, all the crap in /sbin/rc ...

Heh, yes. While looking in there, I was wondering if anyone would
object to splitting the udev and devfs stuff out of the main rc script,
like other parts have been split out? That way I could bundle the udev
portions in the udev package and then keep them up to date (like the
"save modified device nodes logic") ?

thanks,

greg k-h
--
gentoo-dev@gentoo.org mailing list
Re: devfs is dead, let's move on [ In reply to ]
On Thu, Jul 07, 2005 at 10:18:12AM -0400, Chris Gianelloni wrote:
> On Wed, 2005-07-06 at 15:46 -0700, Greg KH wrote:
> > To start with, the 061 version of udev offers a big memory savings if
> > you use the "default" kernel name of a device[3]. If you do that, it does
> > not create a file in its database in /dev/.udevdb/
>
> So if we were to switch to udev 061 in genkernel, it would shrink memory
> usage in our initrd/initramfs, provided we made everything use the LSB
> device names/nodes, versus the devfs ones, correct?

Not in the initrd/initramfs, but in the tmpfs partition that udev uses
to create the /dev entries. Well, I guess you could say the
"initrd/initramfs" if that is where udev is mounted on early startup (I
haven't looked at how genkernel does this in a long time, sorry.)

And yes, the memory savings is there, if we use the LSB names only vs
the devfs name and the symlink like we currently do.

To see this, look at how much space /dev/.udevdb/ takes up right now
with 062 udev. Then change the following rules in
/etc/udev/rules.d/50-udev.rules with the diff at the end of this email.
Then reboot and look at the size of the /dev/.udevdb/ directory again.
I think you will notice a huge space savings.

thanks,

greg k-h

--- 50-udev.rules.orig 2005-07-08 10:10:24.000000000 -0700
+++ 50-udev.rules 2005-07-08 10:11:16.000000000 -0700
@@ -139,9 +139,9 @@
# tty devices
KERNEL=="console", NAME="%k", GROUP="tty", MODE="0600"
KERNEL=="tty", NAME="%k", GROUP="tty", MODE="0666"
-KERNEL=="tty[0-9]*", NAME="vc/%n", SYMLINK+="%k", GROUP="tty"
-KERNEL=="ttyS[0-9]*", NAME="tts/%n", SYMLINK+="%k", GROUP="tty"
-KERNEL=="ttyUSB[0-9]*", NAME="tts/USB%n", GROUP="tty", MODE="0660"
+KERNEL=="tty[0-9]*", NAME="%k", GROUP="tty"
+KERNEL=="ttyS[0-9]*", NAME="%k", GROUP="tty"
+KERNEL=="ttyUSB[0-9]*", NAME="%k", GROUP="tty", MODE="0660"
KERNEL=="ippp0", NAME="%k", GROUP="tty"
KERNEL=="isdn*" NAME="%k", GROUP="tty"
KERNEL=="dcbri*", NAME="%k", GROUP="tty"
@@ -149,14 +149,14 @@

# pty devices
KERNEL=="ptmx", NAME="%k", GROUP="tty", MODE="0666"
-KERNEL=="pty[p-za-e][0-9a-f]*", NAME="pty/m%n", SYMLINK+="%k", GROUP="tty"
-KERNEL=="tty[p-za-e][0-9a-f]*", NAME="pty/s%n", SYMLINK+="%k", GROUP="tty"
+KERNEL=="pty[p-za-e][0-9a-f]*", NAME="%k", GROUP="tty"
+KERNEL=="tty[p-za-e][0-9a-f]*", NAME="%k", GROUP="tty"

# vc devices
-KERNEL=="vcs", NAME="vcc/0", SYMLINK+="%k", GROUP="tty"
-KERNEL=="vcs[0-9]*", NAME="vcc/%n", SYMLINK+="%k", GROUP="tty"
-KERNEL=="vcsa", NAME="vcc/a0", SYMLINK+="%k", GROUP="tty"
-KERNEL=="vcsa[0-9]*", NAME="vcc/a%n", SYMLINK+="%k", GROUP="tty"
+KERNEL=="vcs", NAME="%k", GROUP="tty"
+KERNEL=="vcs[0-9]*", NAME="%k", GROUP="tty"
+KERNEL=="vcsa", NAME="%k", GROUP="tty"
+KERNEL=="vcsa[0-9]*", NAME="%k", GROUP="tty"

# memory devices
KERNEL=="random", NAME="%k", MODE="0666"
--
gentoo-dev@gentoo.org mailing list
Re: devfs is dead, let's move on [ In reply to ]
On Fri, Jul 08, 2005 at 02:39:51AM +0900, Georgi Georgiev wrote:
> maillog: 06/07/2005-15:46:51(-0700): Greg KH types
> > Ok, now that devfs is removed from the 2.6 kernel tree[1], I think it's
> > time to start to revisit some of the /dev naming rules that we currently
> > are living with[2].
> >
> > To start with, the 061 version of udev offers a big memory savings if
> > you use the "default" kernel name of a device[3]. If you do that, it does
> > not create a file in its database in /dev/.udevdb/
>
> Ah, that will break /etc/init.d/halt.sh
>
> Particularly the stuff around here:
>
> ebegin "Saving device nodes"
> ...
> cd /dev
> # Find all devices
> find . -xdev -type b -or -type c -or -type l | cut -d/ -f2- > \
> "${devices_real}"
> # Figure out what udev created
> eval $(grep '^[[:space:]]*udev_db=' /etc/udev/udev.conf)
> if [[ -d ${udev_db} ]]; then
> # New udev_db is clear text ...
> udevinfo=$(cat "${udev_db}"/*)
> else
> # Old one is not ...
> udevinfo=$(udevinfo -d)
> fi
> # This basically strips 'S:' and 'N:' from the db output, and then
> # print all the nodes/symlinks udev created ...
> ...
>
> The script will be unable to figure out what device is being handled by
> udev, and what is not.

Ugh, why do people care about tarballs of device nodes... :)

Anyway, yes, this will break that, but only in the way that it will save
more device nodes than it needed to, right? Which isn't really a bad
thing, as stuff will still work properly. But it's not the nicest.

Also, mind if I move this stuff out into the udev package itself? That
will let me keep it up to date with any udev changes (I wasn't even
aware that this checked for different versions of udev database info)
much easier.

thanks,

greg k-h
--
gentoo-dev@gentoo.org mailing list
Re: devfs is dead, let's move on [ In reply to ]
On Thursday 07 July 2005 00:46, Greg KH wrote:
> Ok, now that devfs is removed from the 2.6 kernel tree[1], I think it's
> time to start to revisit some of the /dev naming rules that we currently
> are living with[2].
>
> To start with, the 061 version of udev offers a big memory savings if
> you use the "default" kernel name of a device[3]. If you do that, it does
> not create a file in its database in /dev/.udevdb/

Are there any ebuilds in the tree that are not sysfs/udev-aware? I.o.w. is it
still necessary to have RC_DEVICE_TARBALL="yes" as a default or can we move
to a pure udev system and change the default to "no".
--
gentoo-dev@gentoo.org mailing list
Re: devfs is dead, let's move on [ In reply to ]
On Fri, 8 Jul 2005 10:06:45 -0700
Greg KH <gregkh@gentoo.org> wrote:

> Heh, yes. While looking in there, I was wondering if anyone would
> object to splitting the udev and devfs stuff out of the main rc
> script, like other parts have been split out? That way I could
> bundle the udev portions in the udev package and then keep them up to
> date (like the "save modified device nodes logic") ?

I've been trying to get spanky to do this for a while now. If you
could help annoy him enough that he actually does it I would be happy.
--
gentoo-dev@gentoo.org mailing list
Re: devfs is dead, let's move on [ In reply to ]
On Fri, 2005-07-08 at 19:16 +0100, Stephen Bennett wrote:
> On Fri, 8 Jul 2005 10:06:45 -0700
> Greg KH <gregkh@gentoo.org> wrote:
>
> > Heh, yes. While looking in there, I was wondering if anyone would
> > object to splitting the udev and devfs stuff out of the main rc
> > script, like other parts have been split out? That way I could
> > bundle the udev portions in the udev package and then keep them up to
> > date (like the "save modified device nodes logic") ?
>
> I've been trying to get spanky to do this for a while now. If you
> could help annoy him enough that he actually does it I would be happy.

If I remember correctly, you had to show your updated /sbin/rc first so
that we could see what is duplicate and what not :P


--
Martin Schlemmer
Gentoo Linux Developer, Desktop/System Team Developer
Cape Town, South Africa
Re: devfs is dead, let's move on [ In reply to ]
On Fri, 2005-07-08 at 10:06 -0700, Greg KH wrote:
> On Fri, Jul 08, 2005 at 01:22:24AM +0200, Martin Schlemmer wrote:
> > On Thu, 2005-07-07 at 13:52 -0700, Greg KH wrote:
> > > On Thu, Jul 07, 2005 at 03:55:45PM +0200, Martin Schlemmer wrote:
> > > > On Wed, 2005-07-06 at 15:46 -0700, Greg KH wrote:
> > > > > Ok, now that devfs is removed from the 2.6 kernel tree[1], I think it's
> > > > > time to start to revisit some of the /dev naming rules that we currently
> > > > > are living with[2].
> > > > >
> > > > > To start with, the 061 version of udev offers a big memory savings if
> > > > > you use the "default" kernel name of a device[3]. If you do that, it does
> > > > > not create a file in its database in /dev/.udevdb/
> > > > >
> > > > > If we can move away from some of our devfs-like names, we stand to
> > > > > reclaim a lot of memory from everyone's machines. As an example, if we
> > > > > drop all of the tty/pts/vc/vcc symlinks, and just go with the default
> > > > > kernel name, we save 2.5Mb of space in tempfs/ramfs. I've done this on
> > > > > my machines and everything seems to work just fine (it looks like
> > > > > everything that was trying to use a tty node was just using the symlink
> > > > > anyway.)
> > > > >
> > > > > So, anyone have any objections to me changing the default udev naming
> > > > > scheme in this manner?
> > > > >
> > > >
> > > > Fine with me. I assume we will need to keep the rcscript support for
> > > > those die-hard 2.4 users still, but hopefully we can eventually drop
> > > > that as well.
> > >
> > > What rcscript support?
> > >
> >
> > Err, sorry, all the crap in /sbin/rc ...
>
> Heh, yes. While looking in there, I was wondering if anyone would
> object to splitting the udev and devfs stuff out of the main rc script,
> like other parts have been split out? That way I could bundle the udev
> portions in the udev package and then keep them up to date (like the
> "save modified device nodes logic") ?
>

Hmm, the udev stuff should be fine, as we can probably do that via
addons. The devfs stuff might be more of an issue, except if I leave
the devfsd restart stuff where it is (don't think it should be an
issue).

I'll whip something up over the weekend ...


Thanks,

--
Martin Schlemmer
Gentoo Linux Developer, Desktop/System Team Developer
Cape Town, South Africa
Re: devfs is dead, let's move on [ In reply to ]
On Fri, Jul 08, 2005 at 07:49:34PM +0200, Michiel de Bruijne wrote:
> On Thursday 07 July 2005 00:46, Greg KH wrote:
> > Ok, now that devfs is removed from the 2.6 kernel tree[1], I think it's
> > time to start to revisit some of the /dev naming rules that we currently
> > are living with[2].
> >
> > To start with, the 061 version of udev offers a big memory savings if
> > you use the "default" kernel name of a device[3]. If you do that, it does
> > not create a file in its database in /dev/.udevdb/
>
> Are there any ebuilds in the tree that are not sysfs/udev-aware?

Not that I am aware of. Anyone else know of any?

> I.o.w. is it still necessary to have RC_DEVICE_TARBALL="yes" as a
> default or can we move to a pure udev system and change the default to
> "no".

I've been running my boxes successfully with "no" since the option
showed up just fine :)

thanks,

greg k-hj
--
gentoo-dev@gentoo.org mailing list
Re: devfs is dead, let's move on [ In reply to ]
On Saturday 09 July 2005 00:25, Greg KH wrote:
> > I.o.w. is it still necessary to have RC_DEVICE_TARBALL="yes" as a
> > default or can we move to a pure udev system and change the default to
> > "no".
>
> I've been running my boxes successfully with "no" since the option
> showed up just fine :)

Same over here on all boxes maintained by me (21 with different hardware).
Using the tarball creates a lot of unnecessary clutter in /dev

If all ebuilds/enough ebuilds don't need to have the tarball, I would say
change the default and let all users enjoy the pure udev ride.
--
gentoo-dev@gentoo.org mailing list
Re: devfs is dead, let's move on [ In reply to ]
On Fri, 2005-07-08 at 15:25 -0700, Greg KH wrote:
> On Fri, Jul 08, 2005 at 07:49:34PM +0200, Michiel de Bruijne wrote:
> > On Thursday 07 July 2005 00:46, Greg KH wrote:
> > > Ok, now that devfs is removed from the 2.6 kernel tree[1], I think it's
> > > time to start to revisit some of the /dev naming rules that we currently
> > > are living with[2].
> > >
> > > To start with, the 061 version of udev offers a big memory savings if
> > > you use the "default" kernel name of a device[3]. If you do that, it does
> > > not create a file in its database in /dev/.udevdb/
> >
> > Are there any ebuilds in the tree that are not sysfs/udev-aware?
>
> Not that I am aware of. Anyone else know of any?
>

Neither. Or rather, I do not know about anything that should not work
with LSB /dev ...

> > I.o.w. is it still necessary to have RC_DEVICE_TARBALL="yes" as a
> > default or can we move to a pure udev system and change the default to
> > "no".
>
> I've been running my boxes successfully with "no" since the option
> showed up just fine :)
>

I think people is under a misconception about this option and ... you
really only need to enable this for a driver that is not sysfs aware
(nvidia comes to mind - any others?), or if you have some custom nodes
in /dev that you cannot do via udev ... And I am pretty sure (correct
me if I am wrong) that all (or most?) in-kernel drivers are sysfs aware,
and only a handful outside are not.


--
Martin Schlemmer
Gentoo Linux Developer, Desktop/System Team Developer
Cape Town, South Africa
Re: devfs is dead, let's move on [ In reply to ]
On Saturday 09 July 2005 01:35, Martin Schlemmer wrote:
> I think people is under a misconception about this option and ... you
> really only need to enable this for a driver that is not sysfs aware
> (nvidia comes to mind - any others?)

nvidia is also sysfs-aware and /dev-entries are created with udev, I have
RC_DEVICE_TARBALL="no" set on all machines I maintain and a few of them have
a nvidia-card. Works perfectly.
--
gentoo-dev@gentoo.org mailing list

1 2  View All