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
This commit is contained in:
Norman Feske 2022-09-15 14:16:26 +02:00 committed by Christian Helmuth
parent 20df224b19
commit 8bccc6e68f

View File

@ -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 };