1 |
On Wed, 2005-07-06 at 15:46 -0700, Greg KH wrote: |
2 |
> Ok, now that devfs is removed from the 2.6 kernel tree[1], I think it's |
3 |
> time to start to revisit some of the /dev naming rules that we currently |
4 |
> are living with[2]. |
5 |
> |
6 |
> To start with, the 061 version of udev offers a big memory savings if |
7 |
> you use the "default" kernel name of a device[3]. If you do that, it does |
8 |
> not create a file in its database in /dev/.udevdb/ |
9 |
> |
10 |
> If we can move away from some of our devfs-like names, we stand to |
11 |
> reclaim a lot of memory from everyone's machines. As an example, if we |
12 |
> drop all of the tty/pts/vc/vcc symlinks, and just go with the default |
13 |
> kernel name, we save 2.5Mb of space in tempfs/ramfs. I've done this on |
14 |
> my machines and everything seems to work just fine (it looks like |
15 |
> everything that was trying to use a tty node was just using the symlink |
16 |
> anyway.) |
17 |
> |
18 |
> So, anyone have any objections to me changing the default udev naming |
19 |
> scheme in this manner? |
20 |
> |
21 |
|
22 |
Fine with me. I assume we will need to keep the rcscript support for |
23 |
those die-hard 2.4 users still, but hopefully we can eventually drop |
24 |
that as well. |
25 |
|
26 |
> Next up, that loony block device naming scheme (more on that later...) |
27 |
> |
28 |
|
29 |
Heh. I hope that we will still at least just do the cdsymlinks stuff |
30 |
(just the /dev/cdrom, /dev/dvd, etc stuff) as that do make things a bit |
31 |
easier for multimedia stuff. |
32 |
|
33 |
|
34 |
> [3] HAL needs a patch to be able to handle this. It's posted on the |
35 |
> hal development mailing lists and will be checked in real-soon-now. |
36 |
|
37 |
I just think we need to make sure this is in first ... |
38 |
|
39 |
|
40 |
Lastly on an unrelated note ... I have a rule: |
41 |
|
42 |
----- |
43 |
# cat /etc/udev/rules.d/40-dm.rules |
44 |
KERNEL="dm-[0-9]*", PROGRAM="/sbin/devmap_name %M %m", NAME="mapper/%c", SYMLINK="%c" |
45 |
----- |
46 |
|
47 |
And in theory it should be the last rule to set the name ... however the |
48 |
default one in 50-udev.rules overrides it, and I have to add |
49 |
OPTIONS="last_rule" |
50 |
|
51 |
--- (default rule) --- |
52 |
KERNEL="dm-[0-9]*", NAME="" |
53 |
---------------------- |
54 |
|
55 |
I am assuming (without having looked at the code) that because NAME is |
56 |
set to "", whatever code that should drop it as it have NAME, does not |
57 |
kick in? |
58 |
|
59 |
|
60 |
Thanks, |
61 |
|
62 |
-- |
63 |
Martin Schlemmer |
64 |
Gentoo Linux Developer, Desktop/System Team Developer |
65 |
Cape Town, South Africa |