core: add comment to set_rr_scheduling

Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com>
This commit is contained in:
Yuxuan Shui 2023-06-26 13:25:53 +01:00
parent e0c14f63c6
commit f8cdc81635
No known key found for this signature in database
GPG Key ID: D3A4405BE6CC17F4
1 changed files with 8 additions and 0 deletions

View File

@ -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);