mirror of
https://github.com/genodelabs/genode.git
synced 2025-06-17 22:58:26 +00:00
base: introduce Env::try_session
The new 'Env::try_session' method mirrors the existing 'Env::session' without implicitly handling exceptions of the types 'Out_of_ram', 'Out_of_caps', 'Insufficient_ram_quota', and 'Insufficient_cap_quota'. It enables runtime environments like init to reflect those exceptions to their children instead of paying the costs of implicit session-quota upgrades out of the own pocket. By changing the 'Parent_service' to use 'try_session', this patch fixes a resource-exhaustion problem of init in Sculpt OS that occurred when the GPU multiplexer created a large batch of IO_MEM sessions, with each session requiring a second attempt with the session quota upgraded by 4 KiB. Issue #3767
This commit is contained in:
@ -40,7 +40,7 @@ class Sandbox::Abandonable : Interface
|
||||
};
|
||||
|
||||
|
||||
class Sandbox::Parent_service : public Genode::Parent_service, public Abandonable
|
||||
class Sandbox::Parent_service : public Genode::Try_parent_service, public Abandonable
|
||||
{
|
||||
private:
|
||||
|
||||
@ -51,7 +51,7 @@ class Sandbox::Parent_service : public Genode::Parent_service, public Abandonabl
|
||||
Parent_service(Registry<Parent_service> ®istry, Env &env,
|
||||
Service::Name const &name)
|
||||
:
|
||||
Genode::Parent_service(env, name), _reg_elem(registry, *this)
|
||||
Genode::Try_parent_service(env, name), _reg_elem(registry, *this)
|
||||
{ }
|
||||
};
|
||||
|
||||
|
Reference in New Issue
Block a user