[RTEMS Project] #3894: Replace the device filesystem with a specialization of the IMFS
RTEMS trac
trac at rtems.org
Fri Mar 6 06:58:06 UTC 2020
#3894: Replace the device filesystem with a specialization of the IMFS
-----------------------------+------------------------------
Reporter: Sebastian Huber | Owner: Sebastian Huber
Type: enhancement | Status: assigned
Priority: normal | Milestone: 5.1
Component: fs | Version: 5
Severity: normal | Resolution:
Keywords: | Blocked By:
Blocking: 3898 |
-----------------------------+------------------------------
Comment (by Sebastian Huber):
Replying to [comment:2 Sebastian Huber]:
> Replying to [comment:1 Chris Johns]:
> > How doe the size of this approach compare to the `devfs` approach?
>
> I don't have numbers yet. I guess it will slightly increase.
I checked the code size change of the devfs04 test before and after the
change to the IMFS specialization:
size pre/devfs04.exe
text data bss dec hex filename
57328 1152 17312 75792 12810 pre/devfs04.exe
size post/devfs04.exe
text data bss dec hex filename
58384 1152 16096 75632 12770 post/devfs04.exe
The code size increases by 1056 bytes on SPARCV8.
In case the support for legacy IO drivers is disabled via
{{{
#define CONFIGURE_IMFS_DISABLE_MKNOD_DEVICE
#define CONFIGURE_IMFS_DISABLE_MKNOD
}}}
the code size drops to:
size devfs04.exe
text data bss dec hex filename
56496 1152 16096 73744 12010 devfs04.exe
Using IMFS_add_node() gives you access to all file handlers and removes
four layers of indirection, e.g.
read() -> device_read() -> rtems_deviceio_read() -> rtems_io_read() ->
_IO_Driver_address_table -> device handler
compared to
read() -> device handler.
--
Ticket URL: <http://devel.rtems.org/ticket/3894#comment:9>
RTEMS Project <http://www.rtems.org/>
RTEMS Project
More information about the bugs
mailing list