Gentoo Archives: gentoo-dev

From: Greg KH <gregkh@g.o>
To: gentoo-dev@l.g.o
Subject: Re: [gentoo-dev] devfs is dead, let's move on
Date: Fri, 08 Jul 2005 17:59:05
Message-Id: 20050708171252.GD29606@kroah.com
In Reply to: Re: [gentoo-dev] devfs is dead, let's move on by Chris Gianelloni
1 On Thu, Jul 07, 2005 at 10:18:12AM -0400, Chris Gianelloni wrote:
2 > On Wed, 2005-07-06 at 15:46 -0700, Greg KH wrote:
3 > > To start with, the 061 version of udev offers a big memory savings if
4 > > you use the "default" kernel name of a device[3]. If you do that, it does
5 > > not create a file in its database in /dev/.udevdb/
6 >
7 > So if we were to switch to udev 061 in genkernel, it would shrink memory
8 > usage in our initrd/initramfs, provided we made everything use the LSB
9 > device names/nodes, versus the devfs ones, correct?
10
11 Not in the initrd/initramfs, but in the tmpfs partition that udev uses
12 to create the /dev entries. Well, I guess you could say the
13 "initrd/initramfs" if that is where udev is mounted on early startup (I
14 haven't looked at how genkernel does this in a long time, sorry.)
15
16 And yes, the memory savings is there, if we use the LSB names only vs
17 the devfs name and the symlink like we currently do.
18
19 To see this, look at how much space /dev/.udevdb/ takes up right now
20 with 062 udev. Then change the following rules in
21 /etc/udev/rules.d/50-udev.rules with the diff at the end of this email.
22 Then reboot and look at the size of the /dev/.udevdb/ directory again.
23 I think you will notice a huge space savings.
24
25 thanks,
26
27 greg k-h
28
29 --- 50-udev.rules.orig 2005-07-08 10:10:24.000000000 -0700
30 +++ 50-udev.rules 2005-07-08 10:11:16.000000000 -0700
31 @@ -139,9 +139,9 @@
32 # tty devices
33 KERNEL=="console", NAME="%k", GROUP="tty", MODE="0600"
34 KERNEL=="tty", NAME="%k", GROUP="tty", MODE="0666"
35 -KERNEL=="tty[0-9]*", NAME="vc/%n", SYMLINK+="%k", GROUP="tty"
36 -KERNEL=="ttyS[0-9]*", NAME="tts/%n", SYMLINK+="%k", GROUP="tty"
37 -KERNEL=="ttyUSB[0-9]*", NAME="tts/USB%n", GROUP="tty", MODE="0660"
38 +KERNEL=="tty[0-9]*", NAME="%k", GROUP="tty"
39 +KERNEL=="ttyS[0-9]*", NAME="%k", GROUP="tty"
40 +KERNEL=="ttyUSB[0-9]*", NAME="%k", GROUP="tty", MODE="0660"
41 KERNEL=="ippp0", NAME="%k", GROUP="tty"
42 KERNEL=="isdn*" NAME="%k", GROUP="tty"
43 KERNEL=="dcbri*", NAME="%k", GROUP="tty"
44 @@ -149,14 +149,14 @@
45
46 # pty devices
47 KERNEL=="ptmx", NAME="%k", GROUP="tty", MODE="0666"
48 -KERNEL=="pty[p-za-e][0-9a-f]*", NAME="pty/m%n", SYMLINK+="%k", GROUP="tty"
49 -KERNEL=="tty[p-za-e][0-9a-f]*", NAME="pty/s%n", SYMLINK+="%k", GROUP="tty"
50 +KERNEL=="pty[p-za-e][0-9a-f]*", NAME="%k", GROUP="tty"
51 +KERNEL=="tty[p-za-e][0-9a-f]*", NAME="%k", GROUP="tty"
52
53 # vc devices
54 -KERNEL=="vcs", NAME="vcc/0", SYMLINK+="%k", GROUP="tty"
55 -KERNEL=="vcs[0-9]*", NAME="vcc/%n", SYMLINK+="%k", GROUP="tty"
56 -KERNEL=="vcsa", NAME="vcc/a0", SYMLINK+="%k", GROUP="tty"
57 -KERNEL=="vcsa[0-9]*", NAME="vcc/a%n", SYMLINK+="%k", GROUP="tty"
58 +KERNEL=="vcs", NAME="%k", GROUP="tty"
59 +KERNEL=="vcs[0-9]*", NAME="%k", GROUP="tty"
60 +KERNEL=="vcsa", NAME="%k", GROUP="tty"
61 +KERNEL=="vcsa[0-9]*", NAME="%k", GROUP="tty"
62
63 # memory devices
64 KERNEL=="random", NAME="%k", MODE="0666"
65 --
66 gentoo-dev@g.o mailing list

Replies

Subject Author
Re: [gentoo-dev] devfs is dead, let's move on Georgi Georgiev <chutz@×××.net>
Re: [gentoo-dev] devfs is dead, let's move on Greg KH <gregkh@g.o>