Re: [RTEMS Project] #2786: Remove the devfs in favor of a stripped down IMFS configuration

2016-09-19 Thread RTEMS trac
#2786: Remove the devfs in favor of a stripped down IMFS configuration
-+---
 Reporter:  sebastian.huber  |   Owner:
 Type:  enhancement  |  Status:  new
 Priority:  normal   |   Milestone:  4.12
Component:  filesystem   | Version:  4.12
 Severity:  normal   |  Resolution:
 Keywords:   |
-+---

Comment (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
 , 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=, 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 ,
 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].

--
Ticket URL: 
RTEMS Project 
RTEMS Project
___
bugs mailing list
bugs@rtems.org
http://lists.rtems.org/mailman/listinfo/bugs


Re: [RTEMS Project] #2786: Remove the devfs in favor of a stripped down IMFS configuration

2016-09-19 Thread RTEMS trac
#2786: Remove the devfs in favor of a stripped down IMFS configuration
-+---
 Reporter:  sebastian.huber  |   Owner:
 Type:  enhancement  |  Status:  new
 Priority:  normal   |   Milestone:  4.12
Component:  filesystem   | Version:  4.12
 Severity:  normal   |  Resolution:
 Keywords:   |
-+---

Comment (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.

--
Ticket URL: 
RTEMS Project 
RTEMS Project
___
bugs mailing list
bugs@rtems.org
http://lists.rtems.org/mailman/listinfo/bugs