View previous topic :: View next topic |
Author |
Message |
wcg Guru
Joined: 06 Jan 2009 Posts: 588
|
Posted: Fri Mar 29, 2013 10:20 am Post subject: devtmpfs question |
|
|
What does devtmpfs give us that tmpfs does not?
(I see that it is required by udev beyond a certain version
and that the kernel has support for it, but why would
not the tmpfs that already existed before devtmpfs
was introduced in the kernel work for the same
purpose, an in-memory filesystem to store user
accessible device nodes?)
edit:
(I guess should have posted this question in Kernel and Hardware.
I do not know how to move it there, feel free to do so if you do.) _________________ TIA |
|
Back to top |
|
|
fpemud Guru
Joined: 15 Feb 2012 Posts: 349
|
Posted: Fri Mar 29, 2013 12:20 pm Post subject: |
|
|
devtmpfs = tmpfs + kernel puts standard dev files in it
Before devtmpfs, udev creates all the dev files in /dev which is a pure tmpfs.
But it's slow, because udev must iterate /sys to do it.
Since dev files have standard names, like /dev/hda /dev/sr0, we let kernel create them. It's much faster.
udev only creates symlinks which act as dev file alias, like /dev/cdrom.
udev can be removed if the system doesn't need any alias.
Last edited by fpemud on Fri Mar 29, 2013 12:52 pm; edited 2 times in total |
|
Back to top |
|
|
Gusar Advocate
Joined: 09 Apr 2005 Posts: 2665 Location: Slovenia
|
Posted: Fri Mar 29, 2013 12:38 pm Post subject: |
|
|
It's very simple - devtmpfs doesn't need udev, it's standalone. This is great for rescue scenarios (when you need init=/bin/sh), or embedded systems. There's also a speed consideration, you know, the eternal quest for faster boot times. Having the kernel create device nodes is faster than creating them with udev.
devtmpfs creates device nodes, then udev works on top of that, changing permissions and creating symlinks. |
|
Back to top |
|
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|