diff options
author | Luca Boccassi <luca.boccassi@microsoft.com> | 2021-09-27 14:49:47 +0100 |
---|---|---|
committer | Lennart Poettering <lennart@poettering.net> | 2021-09-27 20:34:41 +0200 |
commit | 3542da2442d8b29661b47c42ad7e5fa9bc8562ec (patch) | |
tree | 67af7e7ab599827e2deb273ab9418a22c2ca2fc6 /src/oom | |
parent | 49e9218ae3c69bae73b89da687d957c7327ed780 (diff) | |
download | systemd-3542da2442d8b29661b47c42ad7e5fa9bc8562ec.tar.gz |
parse-util: prefix load average macros with LOAD_AVG_
Follow-up for #20839
Diffstat (limited to 'src/oom')
-rw-r--r-- | src/oom/oomd-manager.c | 10 | ||||
-rw-r--r-- | src/oom/oomd-util.c | 8 |
2 files changed, 9 insertions, 9 deletions
diff --git a/src/oom/oomd-manager.c b/src/oom/oomd-manager.c index 1dc83a505c..b0d365e46b 100644 --- a/src/oom/oomd-manager.c +++ b/src/oom/oomd-manager.c @@ -502,8 +502,8 @@ static int monitor_memory_pressure_contexts_handler(sd_event_source *s, uint64_t log_debug("Memory pressure for %s is %lu.%02lu%% > %lu.%02lu%% for > %s with reclaim activity", t->path, - INT_SIDE(t->memory_pressure.avg10), DECIMAL_SIDE(t->memory_pressure.avg10), - INT_SIDE(t->mem_pressure_limit), DECIMAL_SIDE(t->mem_pressure_limit), + LOADAVG_INT_SIDE(t->memory_pressure.avg10), LOADAVG_DECIMAL_SIDE(t->memory_pressure.avg10), + LOADAVG_INT_SIDE(t->mem_pressure_limit), LOADAVG_DECIMAL_SIDE(t->mem_pressure_limit), FORMAT_TIMESPAN(m->default_mem_pressure_duration_usec, USEC_PER_SEC)); r = update_monitored_cgroup_contexts_candidates( @@ -527,8 +527,8 @@ static int monitor_memory_pressure_contexts_handler(sd_event_source *s, uint64_t log_notice("Killed %s due to memory pressure for %s being %lu.%02lu%% > %lu.%02lu%%" " for > %s with reclaim activity", selected, t->path, - INT_SIDE(t->memory_pressure.avg10), DECIMAL_SIDE(t->memory_pressure.avg10), - INT_SIDE(t->mem_pressure_limit), DECIMAL_SIDE(t->mem_pressure_limit), + LOADAVG_INT_SIDE(t->memory_pressure.avg10), LOADAVG_DECIMAL_SIDE(t->memory_pressure.avg10), + LOADAVG_INT_SIDE(t->mem_pressure_limit), LOADAVG_DECIMAL_SIDE(t->mem_pressure_limit), FORMAT_TIMESPAN(m->default_mem_pressure_duration_usec, USEC_PER_SEC)); return 0; } @@ -811,7 +811,7 @@ int manager_get_dump_string(Manager *m, char **ret) { "System Context:\n", yes_no(m->dry_run), PERMYRIAD_AS_PERCENT_FORMAT_VAL(m->swap_used_limit_permyriad), - INT_SIDE(m->default_mem_pressure_limit), DECIMAL_SIDE(m->default_mem_pressure_limit), + LOADAVG_INT_SIDE(m->default_mem_pressure_limit), LOADAVG_DECIMAL_SIDE(m->default_mem_pressure_limit), FORMAT_TIMESPAN(m->default_mem_pressure_duration_usec, USEC_PER_SEC)); oomd_dump_system_context(&m->system_context, f, "\t"); diff --git a/src/oom/oomd-util.c b/src/oom/oomd-util.c index a92bc5fdf6..64ea8cf7e4 100644 --- a/src/oom/oomd-util.c +++ b/src/oom/oomd-util.c @@ -530,11 +530,11 @@ void oomd_dump_memory_pressure_cgroup_context(const OomdCGroupContext *ctx, FILE "%s\tPressure: Avg10: %lu.%02lu Avg60: %lu.%02lu Avg300: %lu.%02lu Total: %s\n" "%s\tCurrent Memory Usage: %s\n", strempty(prefix), ctx->path, - strempty(prefix), INT_SIDE(ctx->mem_pressure_limit), DECIMAL_SIDE(ctx->mem_pressure_limit), + strempty(prefix), LOADAVG_INT_SIDE(ctx->mem_pressure_limit), LOADAVG_DECIMAL_SIDE(ctx->mem_pressure_limit), strempty(prefix), - INT_SIDE(ctx->memory_pressure.avg10), DECIMAL_SIDE(ctx->memory_pressure.avg10), - INT_SIDE(ctx->memory_pressure.avg60), DECIMAL_SIDE(ctx->memory_pressure.avg60), - INT_SIDE(ctx->memory_pressure.avg300), DECIMAL_SIDE(ctx->memory_pressure.avg300), + LOADAVG_INT_SIDE(ctx->memory_pressure.avg10), LOADAVG_DECIMAL_SIDE(ctx->memory_pressure.avg10), + LOADAVG_INT_SIDE(ctx->memory_pressure.avg60), LOADAVG_DECIMAL_SIDE(ctx->memory_pressure.avg60), + LOADAVG_INT_SIDE(ctx->memory_pressure.avg300), LOADAVG_DECIMAL_SIDE(ctx->memory_pressure.avg300), FORMAT_TIMESPAN(ctx->memory_pressure.total, USEC_PER_SEC), strempty(prefix), FORMAT_BYTES(ctx->current_memory_usage)); |