From 8bccc6e68f72049218f65c818877a025d7a693f3 Mon Sep 17 00:00:00 2001 From: Norman Feske Date: Thu, 15 Sep 2022 14:16:26 +0200 Subject: [PATCH] cached_fs_rom: increase fs buffer size to 4 MiB The default file-system communication-buffer size of 128 KiB combined with the clamping of requests to 1/4th the buffer size results in the fragementation of read operations into 32 KiB chunks. This is overly conservative and causes high context-switch overhead down the storage stack (vfs server -> part_block -> block driver). Related to #4613 --- repos/os/src/server/cached_fs_rom/main.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/repos/os/src/server/cached_fs_rom/main.cc b/repos/os/src/server/cached_fs_rom/main.cc index cae731c3cd..5afb7cf95e 100755 --- a/repos/os/src/server/cached_fs_rom/main.cc +++ b/repos/os/src/server/cached_fs_rom/main.cc @@ -167,7 +167,7 @@ struct Cached_fs_rom::Transfer final if (!_fs.tx()->ready_to_submit()) throw Packet_alloc_failed(); - size_t chunk_size = (size_t)min(_size, _fs.tx()->bulk_buffer_size()/4); + size_t chunk_size = (size_t)min(_size, _fs.tx()->bulk_buffer_size()/2); return _fs.tx()->alloc_packet(chunk_size); } @@ -280,7 +280,7 @@ struct Cached_fs_rom::Main final : Genode::Session_request_handler Heap heap { env.pd(), env.rm() }; Allocator_avl fs_tx_block_alloc { &heap }; - File_system::Connection fs { env, fs_tx_block_alloc }; + File_system::Connection fs { env, fs_tx_block_alloc, "", "/", false, 4*1024*1024 }; Session_requests_rom session_requests { env, *this };