mirror of
https://github.com/genodelabs/genode.git
synced 2024-12-18 13:26:27 +00:00
gui_session: adjust session quota for wm scenarios
The current default session RAM quota of 36 KiB reflects the needs of the nitpicker GUI server. However, in most commonly used scenarios, a GUI client connects to nitpicker indirectly via the wm. The low value worked so far because the wm did not account RAM and cap usage per client so far but paid out of its own pocket and faithfully forwarded all resource upgrades to nitpicker. When adding resource accounting to the wm, the old default value has the effect that a new client has to repeatedly attempt the session creation - each time offering sligthly more session quota - until both nitpicker and the wm are satisfied. By roughly doubling the default to 80 KiB, a wm client immediately succeeds with opening a GUI session without repeated attempts. By specifying a custom 'cap_quota' amount to the 'Genode::Connection', the Gui::Connection now donates enough caps for both the wm and nitpicker. Issue #5340
This commit is contained in:
parent
034de3b1b1
commit
a9b2d9bdc6
@ -8,9 +8,9 @@
|
||||
<service name="Timer"/>
|
||||
<service name="Report"/>
|
||||
</parent-provides>
|
||||
<start name="decorator" caps="400">
|
||||
<start name="decorator" caps="320">
|
||||
<binary name="themed_decorator"/>
|
||||
<resource name="RAM" quantum="12M"/>
|
||||
<resource name="RAM" quantum="11M"/>
|
||||
<config>
|
||||
<libc/>
|
||||
<vfs> <tar name="plain_decorator_theme.tar"/> </vfs>
|
||||
|
@ -41,6 +41,17 @@ class Gui::Connection : private Genode::Connection<Session>
|
||||
|
||||
Ram_quota _ram_quota { }; /* session quota donated for virtual frame buffer */
|
||||
|
||||
/*
|
||||
* Session quota at the construction time of the connection
|
||||
*
|
||||
* The 'Gui::Session::CAP_QUOTA' value is based the needs of the
|
||||
* nitpicker GUI server. To accommodate the common case where a client
|
||||
* is served by the wm, which in turn wraps a nitpicker session, extend
|
||||
* the session quota according to the needs of the wm.
|
||||
*/
|
||||
static constexpr Ram_quota _RAM_QUOTA { 96*1024 };
|
||||
static constexpr Cap_quota _CAP_QUOTA { Session::CAP_QUOTA + 9 };
|
||||
|
||||
public:
|
||||
|
||||
View_ids view_ids { };
|
||||
@ -65,7 +76,8 @@ class Gui::Connection : private Genode::Connection<Session>
|
||||
*/
|
||||
Connection(Env &env, Session_label const &label = { })
|
||||
:
|
||||
Genode::Connection<Session>(env, label, Ram_quota { 36*1024 }, Args()),
|
||||
Genode::Connection<Session>(env, label, _RAM_QUOTA, _CAP_QUOTA,
|
||||
Affinity { }, Args { }),
|
||||
_env(env)
|
||||
{ }
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user