#2786 assigned enhancement

Remove the devfs in favor of a stripped down IMFS configuration

Reported by: Sebastian Huber Owned by: Needs Funding
Priority: normal Milestone: Indefinite
Component: fs Version: 5
Severity: normal Keywords:
Cc: Blocked By:
Blocking:

Description

The IMFS offers the ability to register generic nodes for device drivers. This feature is not available in the devfs. The devfs offers little benefit compared to a stripped down IMFS configuration.

Change History (3)

comment:1 Changed on Sep 19, 2016 at 2:42:54 PM by Joel Sherrill

The devfs was added for at least two purposes. Just saying it doesn't support a particular feature isn't enough to obsolete it. You need to do a lot better job at justifying this change.

The devfs was added for at least two purposes:

  • to have a smaller footprint filesystem that supported only device nodes. Otherwise, no console or other device access was possible.
  • to have a much simpler root filesystem that was an alternative for systems which had completely disabled all filesystem support prior to this point.

If the mini-IMFS has shrunk to the point where there is little difference, then the first point is addressed. But you didn't provide data.

The complexity of the mini-IMFS in a system that only wants devices is a topic that hasn't even been touched on and will require some analysis.

comment:2 Changed on Sep 20, 2016 at 5:38:07 AM by Sebastian Huber

The devfs has some design flaws.

  • It uses a link-time configured fixed-size table to store the devices.
  • It uses the standard RTEMS drivers.

The standard RTEMS drivers have some design flaws

  • They use a link-time configured fixed-size table. A const array of handlers is copied into one of the table entries via rtems_io_register_driver(), e.g. size is doubled.
  • They are not able to fully support the handlers available via the filesystem layer (rtems_filesystem_file_handlers_r), e.g. no kqueue(), fsync().
  • There is a considerable layering before you reach the device handler with a parameter pack/unpack, e.g.
#0  rtems_termios_write (arg=0x2046a50) at ../../../../../../rtems/c/src/../../cpukit/libcsupport/src/termios.c:1100
#1  0x0201ad48 in rtems_io_write (major=major@entry=0, minor=minor@entry=0, argument=argument@entry=0x2046a50) at ../../../../../../rtems/c/src/../../cpukit/sapi/src/iowrite.c:36
#2  0x0201aa84 in rtems_deviceio_write (iop=0x2027bb0 <rtems_libio_iops+112>, buf=0x2021550 <_rodata_start+128>, nbyte=20, major=0, minor=0) at ../../../../../../rtems/c/src/../../cpukit/libcsupport/src/sup_fs_deviceio.c:109
#3  0x02021310 in write (fd=<optimized out>, buffer=0x2021550 <_rodata_start+128>, count=20) at ../../../../../../rtems/c/src/../../cpukit/libcsupport/src/write.c:48

vs.

#0  rtems_termios_imfs_write (iop=0x20c1d0 <rtems_libio_iops+112>, buffer=0x1300a0, count=20) at ../../../../../../rtems/c/src/../../cpukit/libcsupport/src/termios.c:1931
#1  0x0012fbcc in write (fd=2, buffer=0x1300a0, count=20) at ../../../../../../rtems/c/src/../../cpukit/libcsupport/src/write.c:48

For an example how IMFS can be configured, see fstests/fsimfsconfig0[123].

comment:3 Changed on Feb 15, 2017 at 2:20:42 PM by Sebastian Huber

Milestone: 4.12Indefinite
Owner: set to Needs Funding
Status: newassigned
Note: See TracTickets for help on using tickets.