From baabcbe606dcb48406e7de480a85cefa19d71811 Mon Sep 17 00:00:00 2001 From: Robbert van der Helm Date: Mon, 17 Jan 2022 14:00:33 +0100 Subject: [PATCH] module-pw: Log when RTKit limits RLIMIT_RTTIME --- src/modules/module-rt.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/modules/module-rt.c b/src/modules/module-rt.c index 3f07eba51..522fcbce7 100644 --- a/src/modules/module-rt.c +++ b/src/modules/module-rt.c @@ -551,6 +551,11 @@ static int set_rlimit(struct impl *impl) if (impl->use_rtkit) { rttime = pw_rtkit_get_rttime_usec_max(impl->system_bus); if (rttime >= 0) { + if ((rlim_t)rttime < rl.rlim_cur) { + pw_log_debug("clamping rt.time.soft from %ld to %lld because of RTKit", + rl.rlim_cur, rttime); + } + rl.rlim_cur = SPA_MIN(rl.rlim_cur, (rlim_t)rttime); rl.rlim_max = SPA_MIN(rl.rlim_max, (rlim_t)rttime); }