Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
devtmpfs question
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Portage & Programming
View previous topic :: View next topic  
Author Message
wcg
Guru
Guru


Joined: 06 Jan 2009
Posts: 588

PostPosted: Fri Mar 29, 2013 10:20 am    Post subject: devtmpfs question Reply with quote

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
View user's profile Send private message
fpemud
Guru
Guru


Joined: 15 Feb 2012
Posts: 349

PostPosted: Fri Mar 29, 2013 12:20 pm    Post subject: Reply with quote

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
View user's profile Send private message
Gusar
Advocate
Advocate


Joined: 09 Apr 2005
Posts: 2665
Location: Slovenia

PostPosted: Fri Mar 29, 2013 12:38 pm    Post subject: Reply with quote

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
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Portage & Programming All times are GMT
Page 1 of 1

 
Jump to:  
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