sculpt: assign CPU quotas

By assigning CPU budgets, base-hw's priorities come into effect.
Even though the chosen values are rather guessed than informed, they
yield a visibly improved responsiveness on the Pinephone.
This commit is contained in:
Norman Feske 2022-01-11 16:32:23 +01:00 committed by Christian Helmuth
parent a084f6c835
commit 55492fbe5b
4 changed files with 15 additions and 2 deletions

View File

@ -225,7 +225,7 @@ install_config {
<start name="timer" priority="0">
<resource name="RAM" quantum="1M"/>
<resource name="CPU" quantum="10"/>
<resource name="CPU" quantum="5"/>
<provides><service name="Timer"/></provides>
</start>
@ -365,7 +365,7 @@ install_config {
<start name="drivers" caps="4600" priority="-1" managing_system="yes">
<resource name="RAM" quantum="200M"/>
<resource name="CPU" quantum="40"/>
<resource name="CPU" quantum="10"/>
<binary name="init"/>
<route>
} [log_route] {
@ -404,6 +404,7 @@ install_config {
<start name="nitpicker" caps="1000" priority="0">
<resource name="RAM" quantum="12M"/>
<resource name="CPU" quantum="10"/>
<provides>
<service name="Gui"/> <service name="Capture"/> <service name="Event"/>
</provides>
@ -520,6 +521,7 @@ install_config {
<start name="leitzentrale" caps="2350" priority="-1">
<binary name="init"/>
<resource name="RAM" quantum="130M"/>
<resource name="CPU" quantum="35"/>
<affinity xpos="1" width="1"/> <!-- decouple leitzentrale from boot CPU -->
<provides>
<service name="Gui"/>

View File

@ -45,6 +45,7 @@
<start name="fader">
<binary name="gui_fader"/>
<resource name="RAM" quantum="50M"/>
<resource name="CPU" quantum="20"/>
<provides> <service name="Gui"/> </provides>
<config initial_fade_in_steps="100" fade_in_steps="20" alpha="210"/>
<route>
@ -59,6 +60,7 @@
<start name="fader">
<binary name="gui_fader"/>
<resource name="RAM" quantum="50M"/>
<resource name="CPU" quantum="20"/>
<provides> <service name="Gui"/> </provides>
<config fade_out_steps="30" alpha="0"/>
<route>
@ -72,6 +74,7 @@
<inline>
<start name="gui_fb">
<resource name="RAM" quantum="18M"/>
<resource name="CPU" quantum="20"/>
<provides> <service name="Framebuffer"/> <service name="Input"/> </provides>
<config/>
<route>
@ -82,6 +85,7 @@
<start name="nitpicker" caps="200">
<resource name="RAM" quantum="10M"/>
<resource name="CPU" quantum="40"/>
<provides>
<service name="Gui"/> <service name="Capture"/> <service name="Event"/>
</provides>
@ -169,6 +173,7 @@
<start name="decorator" caps="350">
<binary name="themed_decorator"/>
<resource name="RAM" quantum="10M"/>
<resource name="CPU" quantum="20"/>
<config>
<libc/>
<vfs>

View File

@ -100,6 +100,9 @@ void Menu_view::_gen_start_node_content(Xml_generator &xml) const
{
_child_state.gen_start_node_content(xml);
gen_named_node(xml, "resource", "CPU", [&] () {
xml.attribute("quantum", 10); });
gen_named_node(xml, "binary", "menu_view");
xml.node("config", [&] () {

View File

@ -24,6 +24,9 @@ void Sculpt::gen_runtime_view_start_content(Xml_generator &xml,
{
state.gen_start_node_content(xml);
gen_named_node(xml, "resource", "CPU", [&] () {
xml.attribute("quantum", 20); });
gen_named_node(xml, "binary", "menu_view");
xml.node("config", [&] () {