core: lower default verbosity when quota exceeds

* only print quota exceeded message and statistic when explicitly enabled
* turn init's error message "cannot respond to request" into a warning
This commit is contained in:
Stefan Kalkowski 2014-02-13 14:07:04 +01:00 committed by Norman Feske
parent 30bfc63b63
commit 6ca8a41232
2 changed files with 9 additions and 7 deletions

View File

@ -123,12 +123,14 @@ Ram_dataspace_capability Ram_session_component::alloc(size_t ds_size, bool cache
*/
if (used_quota() + SBS + ds_size > _quota_limit) {
PWRN("Quota exceeded: %s", _label);
PWRN(" memory for slab: %zu", _ds_slab.consumed());
PWRN(" used quota: %zu", used_quota());
PWRN(" ds_size: %zu", ds_size);
PWRN(" sizeof(Ram_session_component): %zu", sizeof(Ram_session_component));
PWRN(" quota_limit: %zu", _quota_limit);
if (verbose) {
PWRN("Quota exceeded: %s", _label);
PWRN(" memory for slab: %zu", _ds_slab.consumed());
PWRN(" used quota: %zu", used_quota());
PWRN(" ds_size: %zu", ds_size);
PWRN(" sizeof(Ram_session_component): %zu", sizeof(Ram_session_component));
PWRN(" quota_limit: %zu", _quota_limit);
}
throw Quota_exceeded();
}

View File

@ -731,7 +731,7 @@ namespace Init {
.ulong_value(0);
if (avail_slack_ram_quota() < requested_ram_quota) {
PERR("Cannot respond to resource request - out of memory");
PWRN("Cannot respond to resource request - out of memory");
return;
}