mirror of
https://github.com/genodelabs/genode.git
synced 2025-02-21 10:01:57 +00:00
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.
This commit is contained in:
parent
09e535b238
commit
a2ad5c06ab
@ -93,7 +93,7 @@ append_if [have_spec gpio] config "
|
||||
|
||||
append_if $use_usb_driver config {
|
||||
<start name="usb_drv">
|
||||
<resource name="RAM" quantum="12M"/>
|
||||
<resource name="RAM" quantum="14M"/>
|
||||
<provides>
|
||||
<service name="Nic"/>
|
||||
</provides>
|
||||
|
@ -64,7 +64,7 @@ proc nic_drv_config { } {
|
||||
if {[nic_drv] == "usb_drv"} {
|
||||
append result {
|
||||
<start name="usb_drv">
|
||||
<resource name="RAM" quantum="12M"/>
|
||||
<resource name="RAM" quantum="14M"/>
|
||||
<provides>
|
||||
<service name="Nic"/>
|
||||
</provides>
|
||||
@ -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 {
|
||||
<start name="} $prot {_client_} $index {">
|
||||
<binary name="} [client_bin $prot] {" />
|
||||
<resource name="RAM" quantum="28M"/>
|
||||
<resource name="RAM" quantum="} [ram_quota $prot] {"/>
|
||||
<route>
|
||||
<service name="Nic"> <child name="} $nic {"/> </service>
|
||||
<any-service> <parent/> <any-child/> </any-service>
|
||||
@ -106,7 +111,7 @@ proc server_config { prot index ip_addr gateway netmask nic port } {
|
||||
append result {
|
||||
<start name="} $prot {_server_} $index {">
|
||||
<binary name="} [server_bin $prot] {" />
|
||||
<resource name="RAM" quantum="28M"/>
|
||||
<resource name="RAM" quantum="} [ram_quota $prot] {"/>
|
||||
<route>
|
||||
<service name="Nic"> <child name="} $nic {"/> </service>
|
||||
<any-service> <parent/> <any-child/> </any-service>
|
||||
|
@ -68,7 +68,7 @@ proc nic_drv_config { } {
|
||||
if {[nic_drv] == "usb_drv"} {
|
||||
append result {
|
||||
<start name="usb_drv">
|
||||
<resource name="RAM" quantum="12M"/>
|
||||
<resource name="RAM" quantum="14M"/>
|
||||
<provides>
|
||||
<service name="Nic"/>
|
||||
</provides>
|
||||
@ -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 {
|
||||
<start name="} $prot {_client_} $index {">
|
||||
<binary name="} [client_bin $prot] {" />
|
||||
<resource name="RAM" quantum="28M"/>
|
||||
<resource name="RAM" quantum="} [ram_quota $prot] {"/>
|
||||
<route>
|
||||
<service name="Nic"> <child name="} $nic {"/> </service>
|
||||
<any-service> <parent/> <any-child/> </any-service>
|
||||
@ -110,7 +115,7 @@ proc server_config { prot index ip_addr gateway netmask nic port } {
|
||||
append result {
|
||||
<start name="} $prot {_server_} $index {">
|
||||
<binary name="} [server_bin $prot] {" />
|
||||
<resource name="RAM" quantum="28M"/>
|
||||
<resource name="RAM" quantum="} [ram_quota $prot] {"/>
|
||||
<route>
|
||||
<service name="Nic"> <child name="} $nic {"/> </service>
|
||||
<any-service> <parent/> <any-child/> </any-service>
|
||||
@ -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
|
||||
|
@ -149,9 +149,14 @@ append_if $use_nic_bridge config {
|
||||
</route>
|
||||
</start> }
|
||||
|
||||
proc usb_drv_ram_quota {} {
|
||||
if {[have_spec x86]} { return 18M }
|
||||
return 14M
|
||||
}
|
||||
|
||||
append_if $use_usb_driver config {
|
||||
<start name="usb_drv">
|
||||
<resource name="RAM" quantum="12M"/>
|
||||
<resource name="RAM" quantum="} [usb_drv_ram_quota] {"/>
|
||||
<provides>
|
||||
<service name="Nic"/>
|
||||
</provides>}
|
||||
@ -165,7 +170,7 @@ append_if $use_usb_driver config {
|
||||
append_if $use_nic_driver config {
|
||||
<start name="nic_drv">
|
||||
<binary name="} [nic_drv_binary] {"/>
|
||||
<resource name="RAM" quantum="4M"/>
|
||||
<resource name="RAM" quantum="8M"/>
|
||||
<provides><service name="Nic"/></provides>
|
||||
</start>}
|
||||
|
||||
|
@ -92,7 +92,7 @@ append config {
|
||||
</config>
|
||||
</start>
|
||||
<start name="nic_bridge">
|
||||
<resource name="RAM" quantum="4M"/>
|
||||
<resource name="RAM" quantum="6M"/>
|
||||
<provides><service name="Nic"/></provides>
|
||||
<config/>
|
||||
<route>}
|
||||
|
Loading…
x
Reference in New Issue
Block a user