Last edit: Peter Favrholdt on July 2, 2006 18:05 (5194 days, 11 hours and 59 minutes ago) (diff)
Rtai.Dk | RecentChanges | Preferences | DIAPM RTAI

Q: Today I've noticed there's no devfs support in rtai_fifos. I'm quite surprised because devfs is most used in embedded systems, where it saves a valuable amount of storage.

A1: Ummm... so far I _avoid_ devfs especially in embedded systems because of the _increased_ memory footprint. But I may be wrong - can you please explain how devfs will save memory?

A2: I'm no authority in the matter. There's a fairly good explanation in the devfs page. I think you'll find it too at Documentation/filesystems/devfs in the kernel sources.

A standard /dev directory may have thousands of devices. That's an inode per device. A lot of *persistent* storage space. Not sure if cramfs can be used to save space. Will system work with a read-only /dev ?.

You can also place in /dev only the absolutely necessary devices for your system, but that requires quite a bit of knowledge of system internals in order to not miss anything and go crazy trying to find out what's the missing device a program needs.

Not sure 100% about this, but even if you place you /dev in persistent storage, the system has first to read them from there and then CACHE the inodes. A cached inode is a LOT of RAM.

As opposed to that, devfs lives exclusively in RAM, and consumes much less memory per entry than an inode.

A3: There is devfs support in rtai. Yet it is not supported by the examples. If you use devfs, adjust the pathnames in the examples or create symlinks in the /dev directory.

Edit text of this page | View other revisions | Download Rtai.dk