summaryrefslogtreecommitdiffstats
path: root/src/core/cgroup.c
diff options
context:
space:
mode:
authorFilipe Brandenburger <filbranden@google.com>2019-01-24 05:19:44 +0100
committerFilipe Brandenburger <filbranden@google.com>2019-02-14 20:04:42 +0100
commit527ede0c638b47b62a87900438a8a09dea42889e (patch)
treea855fbf8d18eeeef772f2e00ad0398b44171367a /src/core/cgroup.c
parentcore: add CPUQuotaPeriodSec= (diff)
downloadsystemd-527ede0c638b47b62a87900438a8a09dea42889e.tar.xz
systemd-527ede0c638b47b62a87900438a8a09dea42889e.zip
core: downgrade CPUQuotaPeriodSec= clamping logs to debug
After the first warning log, further messages are downgraded to LOG_DEBUG.
Diffstat (limited to 'src/core/cgroup.c')
-rw-r--r--src/core/cgroup.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/core/cgroup.c b/src/core/cgroup.c
index 9fe3ba9907..ccf06173db 100644
--- a/src/core/cgroup.c
+++ b/src/core/cgroup.c
@@ -685,9 +685,10 @@ static usec_t cgroup_cpu_adjust_period_and_log(Unit *u, usec_t period, usec_t qu
if (new_period != period) {
char v[FORMAT_TIMESPAN_MAX];
- log_unit_full(u, LOG_WARNING, 0,
+ log_unit_full(u, u->warned_clamping_cpu_quota_period ? LOG_DEBUG : LOG_WARNING, 0,
"Clamping CPU interval for cpu.max: period is now %s",
format_timespan(v, sizeof(v), new_period, 1));
+ u->warned_clamping_cpu_quota_period = true;
}
return new_period;