From f8cdc81635a0405693beb7c802119acbbc426968 Mon Sep 17 00:00:00 2001 From: Yuxuan Shui Date: Mon, 26 Jun 2023 13:25:53 +0100 Subject: [PATCH] core: add comment to set_rr_scheduling Signed-off-by: Yuxuan Shui --- src/picom.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/picom.c b/src/picom.c index c07626b2..126922e7 100644 --- a/src/picom.c +++ b/src/picom.c @@ -2577,6 +2577,14 @@ err: free(ps); return NULL; } + +/// Switch to real-time scheduling policy (SCHED_RR) if possible +/// +/// Make picom realtime to reduce latency, and make rendering times more predictable to +/// help pacing. +/// +/// This requires the user to set up permissions for the real-time scheduling. e.g. by +/// setting `ulimit -r`, or giving us the CAP_SYS_NICE capability. void set_rr_scheduling(void) { int priority = sched_get_priority_min(SCHED_RR);