mirror of
https://github.com/genodelabs/genode.git
synced 2024-12-19 21:57:55 +00:00
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
This commit is contained in:
parent
99254b4d52
commit
20df224b19
@ -1,7 +1,7 @@
|
||||
RUMP_PORT_DIR := $(call select_from_ports,dde_rump)/src/lib/dde_rump
|
||||
RUMP_BASE := $(BUILD_BASE_DIR)/var/libcache/rump
|
||||
|
||||
CC_C_OPT += -D__NetBSD__ -D'CTASSERT(x)=' -DMAXPHYS=32768 -D_RUMP_NATIVE_ABI \
|
||||
CC_C_OPT += -D__NetBSD__ -D'CTASSERT(x)=' -DMAXPHYS=1048576 -D_RUMP_NATIVE_ABI \
|
||||
-DMAXUSERS=32 -DCOMPAT_50=1 -DCOMPAT_60=1 -DDIAGNOSTIC -DKTRACE \
|
||||
-DRUMP_KERNEL_IS_LIBC -D_RUMPKERNEL -D_KERNEL -DMULTIPROCESSOR \
|
||||
-D_MODULE -DMODULAR -DRUMP_USE_CTOR
|
||||
|
@ -3,7 +3,7 @@ set mkfs_opts "-F"
|
||||
|
||||
set test_build_components "lib/vfs_rump"
|
||||
|
||||
set test_vfs_config "<rump fs=\"ext2fs\" ram=\"7M\" writeable=\"yes\"/>"
|
||||
set test_vfs_config "<rump fs=\"ext2fs\" ram=\"10M\" writeable=\"yes\"/>"
|
||||
|
||||
set test_boot_modules {
|
||||
rump_fs.lib.so
|
||||
|
@ -8,7 +8,7 @@ set mkfs_opts "-F"
|
||||
|
||||
set test_build_components "lib/vfs_rump"
|
||||
|
||||
set test_vfs_config "<rump fs=\"ext2fs\" ram=\"7M\" writeable=\"yes\"/>"
|
||||
set test_vfs_config "<rump fs=\"ext2fs\" ram=\"10M\" writeable=\"yes\"/>"
|
||||
|
||||
set test_boot_modules {
|
||||
rump_fs.lib.so
|
||||
|
@ -39,7 +39,7 @@ create_boot_directory
|
||||
# Generate config
|
||||
#
|
||||
append config {
|
||||
<config>
|
||||
<config verbose="yes">
|
||||
<parent-provides>
|
||||
<service name="ROM"/>
|
||||
<service name="IRQ"/>
|
||||
@ -73,7 +73,7 @@ append config {
|
||||
</config>
|
||||
</start>
|
||||
<start name="vfs" caps="200">
|
||||
<resource name="RAM" quantum="16M" />
|
||||
<resource name="RAM" quantum="25M" />
|
||||
<provides><service name="File_system"/></provides>
|
||||
<config>
|
||||
<vfs> <rump fs="ext2fs" ram="10M"/> </vfs>
|
||||
|
@ -56,7 +56,7 @@ namespace Allocator {
|
||||
private:
|
||||
|
||||
enum {
|
||||
BLOCK_SIZE = 2 * 1024 * 1024, /* 2 MB */
|
||||
BLOCK_SIZE = 4 * 1024 * 1024, /* bytes */
|
||||
ELEMENTS = VM_SIZE / BLOCK_SIZE, /* MAX number of dataspaces in VM */
|
||||
};
|
||||
|
||||
|
@ -107,7 +107,15 @@ class Backend
|
||||
|
||||
Genode::Allocator_avl _alloc { &Rump::env().heap() };
|
||||
Genode::Entrypoint &_ep { Rump::env().env().ep() };
|
||||
Block::Connection<Job> _session { Rump::env().env(), &_alloc };
|
||||
|
||||
/*
|
||||
* The tx_buf_size is chosen such that one I/O request fits into the
|
||||
* I/O buffer at once. The size of NetBSD's I/O requests is bounded by
|
||||
* the definition of MAXPHYS. The 64 KiB are added to account for the
|
||||
* space needed for the submit/ack queues.
|
||||
*/
|
||||
Block::Connection<Job> _session { Rump::env().env(), &_alloc,
|
||||
1024*1024 + 64*1024 };
|
||||
Block::Session::Info _info { _session.info() };
|
||||
Genode::Mutex _session_mutex;
|
||||
Io_signal_blockade _io_signal_blockade { _ep,
|
||||
|
@ -68,7 +68,7 @@ set config {
|
||||
<provides> <service name="Timer"/> </provides>
|
||||
</start>
|
||||
<start name="test-libc_vfs" caps="200">
|
||||
<resource name="RAM" quantum="10M"/>
|
||||
<resource name="RAM" quantum="28M"/>
|
||||
<config>
|
||||
<iterations value="1"/>}
|
||||
append_if [have_include "power_on/qemu"] config {
|
||||
@ -104,7 +104,7 @@ append config {
|
||||
|
||||
append_if $use_vfs_server config "
|
||||
<start name=\"vfs\" caps=\"200\">
|
||||
<resource name=\"RAM\" quantum=\"12M\" />
|
||||
<resource name=\"RAM\" quantum=\"24M\" />
|
||||
<provides><service name=\"File_system\"/></provides>
|
||||
<config>
|
||||
<vfs>
|
||||
|
@ -152,11 +152,11 @@ append_if [have_spec nova] config {
|
||||
append_if [expr $use_rumpfs] config {
|
||||
<start name="rump_fs" priority="-1" caps="200">
|
||||
<binary name="vfs"/>
|
||||
<resource name="RAM" quantum="32M"/>
|
||||
<resource name="RAM" quantum="64M"/>
|
||||
<provides><service name="File_system"/></provides>
|
||||
<config ld_verbose="yes">
|
||||
<vfs>
|
||||
<rump fs="ext2fs" ram="28M"/>
|
||||
<rump fs="ext2fs" ram="48M"/>
|
||||
</vfs>}
|
||||
|
||||
append_if [expr $use_rumpfs && $use_ram_fs && $use_overlay_from_disk] config {
|
||||
|
Loading…
Reference in New Issue
Block a user