mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-10-29 05:40:27 -04:00
module-rt: Log when RTKit lowers priorities
Because otherwise just looking at the rest of the output and seeing the thread being set to priority 20 instead of the value that's set in the config file may look a bit confusing.
This commit is contained in:
parent
4419baec45
commit
a36f902e1d
1 changed files with 5 additions and 4 deletions
|
|
@ -688,9 +688,12 @@ static int impl_acquire_rt(void *data, struct spa_thread *thread, int priority)
|
|||
}
|
||||
|
||||
if (impl->use_rtkit) {
|
||||
pid = impl_gettid(impl, pt);
|
||||
rtprio_limit = pw_rtkit_get_max_realtime_priority(impl->system_bus);
|
||||
if (rtprio_limit >= 0)
|
||||
priority = SPA_MIN(rtprio_limit, priority);
|
||||
if (rtprio_limit >= 0 && rtprio_limit < priority) {
|
||||
pw_log_info("dropping requested priority %d for thread %d down to %d because of RTKit limits", priority, pid, rtprio_limit);
|
||||
priority = rtprio_limit;
|
||||
}
|
||||
|
||||
spa_zero(sp);
|
||||
sp.sched_priority = priority;
|
||||
|
|
@ -699,8 +702,6 @@ static int impl_acquire_rt(void *data, struct spa_thread *thread, int priority)
|
|||
pw_log_debug("SCHED_OTHER|SCHED_RESET_ON_FORK worked.");
|
||||
}
|
||||
|
||||
pid = impl_gettid(impl, pt);
|
||||
|
||||
if ((err = pw_rtkit_make_realtime(impl->system_bus, pid, priority)) < 0) {
|
||||
pw_log_warn("could not make thread %d realtime using RTKit: %s", pid, spa_strerror(err));
|
||||
} else {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue