diff options
author | Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> | 2023-03-21 19:49:18 +0100 |
---|---|---|
committer | Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> | 2023-03-27 10:18:55 +0200 |
commit | ebfb601945b564142d6471fc10aa611c26dbd8b7 (patch) | |
tree | 0ce427e4cefd5398545d8b490cc8c1cc2e0e6000 | |
parent | 9e43296fd2c4959f045859d248a4e78fcfcceae6 (diff) | |
download | systemd-ebfb601945b564142d6471fc10aa611c26dbd8b7.tar.gz |
oomd: add inline comments with param names
-rw-r--r-- | src/oom/oomd-manager.c | 5 | ||||
-rw-r--r-- | src/oom/oomd-util.c | 4 |
2 files changed, 6 insertions, 3 deletions
diff --git a/src/oom/oomd-manager.c b/src/oom/oomd-manager.c index 4a43807b87..08a29ec77b 100644 --- a/src/oom/oomd-manager.c +++ b/src/oom/oomd-manager.c @@ -516,7 +516,10 @@ static int monitor_memory_pressure_contexts_handler(sd_event_source *s, uint64_t else clear_candidates = NULL; - r = oomd_kill_by_pgscan_rate(m->monitored_mem_pressure_cgroup_contexts_candidates, t->path, m->dry_run, &selected); + r = oomd_kill_by_pgscan_rate(m->monitored_mem_pressure_cgroup_contexts_candidates, + /* prefix= */ t->path, + /* dry_run= */ m->dry_run, + &selected); if (r == -ENOMEM) return log_oom(); if (r < 0) diff --git a/src/oom/oomd-util.c b/src/oom/oomd-util.c index f97b771c50..49c10b5e16 100644 --- a/src/oom/oomd-util.c +++ b/src/oom/oomd-util.c @@ -321,7 +321,7 @@ int oomd_kill_by_pgscan_rate(Hashmap *h, const char *prefix, bool dry_run, char if (sorted[i]->pgscan == 0 && sorted[i]->current_memory_usage == 0) continue; - r = oomd_cgroup_kill(sorted[i]->path, true, dry_run); + r = oomd_cgroup_kill(sorted[i]->path, /* recurse= */ true, /* dry_run= */ dry_run); if (r == -ENOMEM) return r; /* Treat oom as a hard error */ if (r < 0) { @@ -365,7 +365,7 @@ int oomd_kill_by_swap_usage(Hashmap *h, uint64_t threshold_usage, bool dry_run, if (sorted[i]->swap_usage <= threshold_usage) continue; - r = oomd_cgroup_kill(sorted[i]->path, true, dry_run); + r = oomd_cgroup_kill(sorted[i]->path, /* recurse= */ true, /* dry_run= */ dry_run); if (r == -ENOMEM) return r; /* Treat oom as a hard error */ if (r < 0) { |