cached_fs_rom on base-linux

Pirmin Duss pirmin.duss at gapfruit.com
Tue Apr 7 14:03:27 CEST 2020


Hello Genodians

I have a scenario on base-linux in which a `fs_rom` component serves
multiple clients by providing the same file as ROM session.
The file can be rather large. So I noticed that `fs_rom` loads the file
into RAM for each session separately. This lead very fast to `resource
requests`.

I remembered that there is the `cached_fs_rom`, that is designed to
handle exactly this scenario and reduce the amount of resources required.

When I replaced `fs_rom` with `cached_fs_rom` in my scenario
`cached_fs_rom` terminated with:

```
[init -> fs_rom] Error: Region_map_mmap::attach: attaching w/o local
addr not supported
[init -> fs_rom] Error: Uncaught exception of type
'Genode::Region_map::Region_conflict'
[init -> fs_rom] Warning: abort called - thread: ep
```

After this I looked to see, if there is a test for `cached_fs_rom`. The
only test except the usage by `sculpt_manager` was in the
`test-read_only_rom` for `depot_autopilot`. When I ran this on different
platforms, it succeeded on all including base-linux. Looking at the test
I discovered that the success condition for the test is a that the
timeout is triggered.

On all other platforms `test-read_only_rom` crashes and on base-linux
`cached_fs_rom` crashes.

My question now is :

 - should cached_fs_rom theoretically work on base-linux, or is there an
   inherent restriction that prevents this?

Best regards,
Pirmin



More information about the users mailing list