From a2ad5c06abb28bd40eb205d250668ec053a7761b Mon Sep 17 00:00:00 2001 From: Christian Helmuth Date: Mon, 20 Mar 2017 11:17:49 +0100 Subject: [PATCH] Adjust run-script RAM quotas to actual demands With the current implementation resource requests are not automically satisfied with slack quota by init. Therefore, this commit adapts RAM quotas of autopilot scenarios to the actual demands. --- repos/libports/run/lwip.run | 2 +- repos/libports/run/nic_dump.run | 11 ++++++++--- repos/libports/run/nic_router.run | 13 +++++++++---- repos/ports/run/netperf.inc | 9 +++++++-- repos/ports/run/noux_net_netcat.run | 2 +- 5 files changed, 26 insertions(+), 11 deletions(-) diff --git a/repos/libports/run/lwip.run b/repos/libports/run/lwip.run index bf276fc6c1..17775faa19 100644 --- a/repos/libports/run/lwip.run +++ b/repos/libports/run/lwip.run @@ -93,7 +93,7 @@ append_if [have_spec gpio] config " append_if $use_usb_driver config { - + diff --git a/repos/libports/run/nic_dump.run b/repos/libports/run/nic_dump.run index 7bdbdaef63..90a5691135 100644 --- a/repos/libports/run/nic_dump.run +++ b/repos/libports/run/nic_dump.run @@ -64,7 +64,7 @@ proc nic_drv_config { } { if {[nic_drv] == "usb_drv"} { append result { - + @@ -84,11 +84,16 @@ proc server_bin { prot } { if {$prot == "udp"} { return "test-lxip_udp_echo" } if {$prot == "http"} { return "test-lwip_httpsrv_static" } } +proc ram_quota { prot } { + if {$prot == "udp"} { return 28M } + if {$prot == "http"} { return 12M } +} + proc client_config { prot index ip_addr gateway netmask nic srv_port srv_ip } { append result { - + @@ -106,7 +111,7 @@ proc server_config { prot index ip_addr gateway netmask nic port } { append result { - + diff --git a/repos/libports/run/nic_router.run b/repos/libports/run/nic_router.run index d17d1e659c..f61970856f 100644 --- a/repos/libports/run/nic_router.run +++ b/repos/libports/run/nic_router.run @@ -68,7 +68,7 @@ proc nic_drv_config { } { if {[nic_drv] == "usb_drv"} { append result { - + @@ -88,11 +88,16 @@ proc server_bin { prot } { if {$prot == "udp"} { return "test-lxip_udp_echo" } if {$prot == "http"} { return "test-lwip_httpsrv_static" } } +proc ram_quota { prot } { + if {$prot == "udp"} { return 28M } + if {$prot == "http"} { return 12M } +} + proc client_config { prot index ip_addr gateway netmask nic srv_port srv_ip } { append result { - + @@ -110,7 +115,7 @@ proc server_config { prot index ip_addr gateway netmask nic port } { append result { - + @@ -277,6 +282,6 @@ proc nic_qemu_args { } { if {[have_spec x86]} { return "-net nic,model=e1000" } if {[have_spec lan9118]} { return "-net nic,model=lan9118" } } -append qemu_args "-m 400 -nographic -net user -redir udp:5555::1337 [nic_qemu_args]" +append qemu_args "-m 384 -nographic -net user -redir udp:5555::1337 [nic_qemu_args]" run_genode_until {.*Test done.*\n.*Test done.*\n.*Test done.*\n.*Test done.*\n.*Test done.*\n.*Test done.*\n} 60 diff --git a/repos/ports/run/netperf.inc b/repos/ports/run/netperf.inc index fac722a6f5..046748f76a 100644 --- a/repos/ports/run/netperf.inc +++ b/repos/ports/run/netperf.inc @@ -149,9 +149,14 @@ append_if $use_nic_bridge config { } +proc usb_drv_ram_quota {} { + if {[have_spec x86]} { return 18M } + return 14M +} + append_if $use_usb_driver config { - + } @@ -165,7 +170,7 @@ append_if $use_usb_driver config { append_if $use_nic_driver config { - + } diff --git a/repos/ports/run/noux_net_netcat.run b/repos/ports/run/noux_net_netcat.run index ff3e218937..eeff780662 100644 --- a/repos/ports/run/noux_net_netcat.run +++ b/repos/ports/run/noux_net_netcat.run @@ -92,7 +92,7 @@ append config { - + }