Commit Graph

265 Commits

Author SHA1 Message Date
9a2c03d2c6 vfs: remove Read_result::READ_ERR_INTERRUPT
The error condition was too vague and thereby remained unused in
practice.

Issue #4706
2023-01-24 12:07:30 +01:00
ca0d3757cc vfs: make 'File_io_service::read_ready' const
... and replace pointer argument to const reference.

Issue #4706
2023-01-24 12:07:29 +01:00
ff2176a586 vfs,libc: support write fds in select
By adding a 'write_ready' interface following the lines of the existing
'read_ready', VFS plugins become able to propagate the (de-)saturation
of I/O buffers to the VFS user. This information is important when using
a non-blocking file descriptor for writing into a TCP socket. Once the
application observes EAGAIN, it expects a subsequent 'select' call to
return as soon as new I/O buffer space becomes available.

Before this patch, the select call would always return under this
condition, causing an unnecessarily busy write loop.

Issue #4697
2023-01-24 12:07:28 +01:00
cf87b0fadb vfs: simplify File_io_service::write return values
This patch removes the 'Insufficient_buffer' exception by returning the
WRITE_ERR_WOULD_BLOCK result value instead. It also eliminates the
superfluous WRITE_ERR_AGAIN and WRITE_ERR_INTERRUPT codes.

Issue #4697
2023-01-24 12:07:28 +01:00
7d8d4f4532 vfs,libc: deferred wakeup of remote peers
This patch facilitates the batching of I/O operations in the VFS library
by replacing the implicit wakeup of remote peer (via the traditional
packet-stream interface like 'submit_packet') by explicit wakeup
signalling.

The wakeup signalling is triggered not before the VFS user settles down.
E.g., for libc-based applications, this is the case if the libc goes
idle, waiting for external I/O.
In the case of a busy writer to a non-blocking file descriptor or socket
(e.g., lighttpd), the remote peers are woken up once a write operation
yields an out-count of 0.

The deferring of wakeup signals is accommodated by the new 'Remote_io'
mechanism (vfs/remote_io.h) that is designated to be used by all VFS
plugins that interact with asynchronous Genode services for I/O.

Issue #4697
2023-01-24 12:07:27 +01:00
b033b30f95 depot: update recipe hashes 2022-11-29 12:32:49 +01:00
c58d799f16 depot: update recipe hashes 2022-11-17 08:00:37 +01:00
847266d027 depot: update recipe hashes 2022-10-12 14:31:50 +02:00
3f1870841c depot: update recipe hashes 2022-09-21 12:19:10 +02:00
20df224b19 dde_rump: increase max I/O request size to 1 MiB
With the increase of MAXPHYS, the rump kernel requests a contiguous
allocation of 2101248 bytes, which exceeds the allocator's block size of
2 MiB.

  Error: backend allocator: Unable to allocate memory (size: 2101248 align: 12)

The patch avoids this corner case by increasing the allocator's block
size to 4 MiB.

Fixes #4613
2022-09-21 12:19:09 +02:00
dd9e12601e Remove pseudo targets for building shared libs
Thanks to the change "build: support library builds via lib/<libname>",
shared libraries can now be built directly by the build system.

Issue #4599
2022-09-19 14:00:32 +02:00
4dddc41b71 depot: update recipe hashes 2022-08-31 09:32:09 +02:00
59f1fe7625 rump: ext2_fs depot package
Usable via Sculpt /config/deploy, e.g. via

  <start name="nvme-0.4.fs" pkg="ext2_fs">
    <route>
      <service name="Block">
        <child name="nvme-0.part_block" label="4"/>
      </service>
      <service name="RM">
        <parent/>
      </service>
    </route>
  </start>

Fixes #4590
2022-08-31 09:32:09 +02:00
44e2cd14a0 depot: update recipe hashes 2022-08-17 12:03:26 +02:00
b5c780993c board: Rename virt_qemu to virt_qemu_<arch>
Instead of having a generic "virt_qemu" board use "virt_qemu_<arch>" in
order to have a clean distinction between boards. Current supported
boards are "virt_qemu_arm_v7a", "virt_qemu_arm_v8a", and
"virt_qemu_riscv".

issue #4034
2022-08-17 12:03:26 +02:00
3105fa9e0f depot: update recipe hashes 2022-05-25 12:23:04 +02:00
0768185fea depot: update recipe hashes 2022-04-28 11:52:06 +02:00
7d6c592417 vfs/rump: handle split block I/O jobs
This patch fixes a potential data corruption issue that could occur when
issuing large I/O requests to vfs/rump, which don't fit into the default
block I/O buffer of 128 KiB. Note that we haven't observed the problem
in practice (Sculpt hosts vfs/rump in a dedicated vfs server, which
fragments requests) but spotted the issue while reviewing the code. We
could trigger problem by explicitly changing the I/O buffer size to 32
KiB.

Issue #4474
2022-04-13 14:08:25 +02:00
8ece236635 depot: update recipe hashes 2022-04-13 11:54:46 +02:00
f91ece78e0 dde_rump: move periodic sync into rump kernel thread
Issue #4459
2022-04-13 09:29:06 +02:00
d8211b65a5 dde_rump: fix clock functions
Issue #4459
2022-04-13 09:29:06 +02:00
95aba3feef dde_rump: dispatch I/O signals in Timed_semaphore
Issue #4459
2022-04-13 09:29:05 +02:00
af80ecb651 dde_rump: check blocking condition right before blocking
Issue #4459
2022-04-13 09:29:05 +02:00
d21464399f vfs_rump: use dynamic_cast for safe downcasts
As it stands, the implementation requires minimal reflection measures to
implement correct cleanup procedure. static_cast<> cannot be used as it
does not implement runtime type casting as dynamic_cast<> does.
2022-04-13 09:29:05 +02:00
8a4f4fcea9 vfs_rump: reflect resource shortage as return values
The function Vfs::Directory_service::watch() is not expected to throw
Out_of_ram/Out_of_caps but use dedicated Watch_result errors.
2022-04-13 09:29:05 +02:00
eb895975e2 lib/vfs: clear BUILD_ARTIFACTS in dummy targets 2022-04-13 09:29:05 +02:00
108fe84f5a Remove SIGNAL/CAP/RAM services from run scripts
Related to #2407
2022-04-13 08:08:00 +02:00
2b3370c8d8 depot: update recipe hashes 2022-02-28 11:46:35 +01:00
88dec4cc94 dde_rump: support blocking I/O operations from non-ep threads
Issue #4433
2022-02-28 11:45:19 +01:00
649647538b depot: update recipe hashes 2022-02-15 10:23:59 +01:00
33b038e8a7 Consistent spelling of "writeable"
Fixes #4425
2022-02-15 10:23:58 +01:00
997a24e91a dde_rump: remove use of Dataspace::phys_addr
This patch removes dead code. The Rump kernel does not need to know any
physical addresses of allocated memory.

Issue #2243
2022-02-15 10:16:52 +01:00
911ff31709 dde_rump: use Block::Connection::Job API
This patch replaces the direct interaction with the packet stream of
the block session by the use of the 'Block::Connection::Job' API,
removing the reliance on blocking packet-stream semantics.

Since I/O signals can now occur during 'Backend::submit', the patch
conditions the periodic calls of 'rump_sys_sync' by taking the backend
state into account.

Issue #4390
2022-02-15 10:10:03 +01:00
65284b29f8 depot: update recipe hashes 2022-01-19 12:38:13 +01:00
713c841965 vfs/rump: enable update mtime
Although support was added some time ago (#1784) the commit missed
executing the code from the 'Vfs::File_system' interface.

Fixes #4371.
2022-01-19 12:38:12 +01:00
5611fd2355 depot: update recipe hashes 2021-12-17 15:06:38 +01:00
92b7be4d11 depot: update recipe hashes 2021-11-30 12:08:54 +01:00
dc39a8db62 base: introduce Allocator::try_alloc
This patch changes the 'Allocator' interface to the use of 'Attempt'
return values instead of using exceptions for propagating errors.

To largely uphold compatibility with components using the original
exception-based interface - in particluar use cases where an 'Allocator'
is passed to the 'new' operator - the traditional 'alloc' is still
supported. But it existes merely as a wrapper around the new
'try_alloc'.

Issue #4324
2021-11-29 15:11:52 +01:00
abc9a2f232 depot: update recipe hashes 2021-10-14 13:46:25 +02:00
83c5648d33 depot: update recipe hashes 2021-08-30 15:00:39 +02:00
ece33d37f8 depot: update recipe hashes 2021-06-25 11:46:37 +02:00
1d52bd017d depot: update recipe hashes 2021-05-28 14:16:46 +02:00
0069660958 rump: fix compiler warning
Fixes two warnings of this type:

! src/lib/vfs/rump/vfs_rump.cc:214:52: warning: narrowing conversion of
! ‘(s.stat::st_mode & 64)’ from ‘__mode_t’ {aka ‘unsigned int’} to ‘bool’
! [-Wnarrowing]
!
!  214 |                           .executable = (s.st_mode & S_IXUSR) };
!      |                                         ~~~~~~~~~~~^~~~~~~~~~

Fixes #4160
2021-05-28 14:15:28 +02:00
fd0a4e78c8 rump: write less to the log
Remove calls to the Genode log functions that were done unconditionally or
according to a static verbosity flag.

Ref #4032
2021-05-28 14:15:27 +02:00
67a8f29697 rump_ext2.run: increase cap quota for sel4 2021-05-28 14:15:27 +02:00
777923f9bd depot: update recipe hashes 2021-05-10 11:18:12 +02:00
516a9a6925 depot: update recipe hashes 2021-05-05 11:35:31 +02:00
9b854e1496 Prevent recursive 'memset()' calls with gcc 10
Fixes #4125
2021-05-05 11:35:31 +02:00
efbed6f7bf depot: update recipe hashes 2021-04-20 12:10:58 +02:00
468e7a825c base/cache.h: rename Cache_attribute to Cache
The short name is better because the type will become prominently
visible at the API.

Issue #2243
2021-04-20 12:10:31 +02:00