sculpt: relax heartbeat rate

This patch reduces the response time of supposedly stuck situations like
an unresponsive part_block component. First, it reduces the heartbeat
rate from 1 to 2 seconds to make it consistent with the frequency of
state reports. Second, it allows up to four skipped heartbeats until
regarding the situation as stuck. With those changes, the prolonged
initialization sequence of a USB ZIP drive succeeds with Sculpt.
This commit is contained in:
Norman Feske 2022-04-11 11:58:37 +02:00 committed by Christian Helmuth
parent 02693734d3
commit 4dbe1588a6
2 changed files with 2 additions and 2 deletions

View File

@ -1797,7 +1797,7 @@ void Sculpt::Main::_generate_runtime_config(Xml_generator &xml) const
xml.attribute("buffer", "1M");
});
xml.node("heartbeat", [&] () { xml.attribute("rate_ms", 1000); });
xml.node("heartbeat", [&] () { xml.attribute("rate_ms", 2000); });
xml.node("parent-provides", [&] () {
gen_parent_service<Rom_session>(xml);

View File

@ -46,7 +46,7 @@ struct Sculpt::Child_exit_state
code = (int)child.attribute_value("exited", 0L);
}
responsive = (child.attribute_value("skipped_heartbeats", 0U) <= 2);
responsive = (child.attribute_value("skipped_heartbeats", 0U) <= 4);
}
});
}