We are currently migrating Bugzilla to GitHub issues.
Any changes made to the bug tracker now will be lost, so please do not post new bugs or make changes to them.
When we're done, all bug URLs will redirect to their equivalent location on the new bug tracker.

Bug 5271

Summary: [PATCH] Respect maximum RLIMIT_RTTIME when setting Linux thread priority
Product: SDL Reporter: Andrew Eikum <aeikum>
Component: threadAssignee: Sam Lantinga <slouken>
Status: RESOLVED FIXED QA Contact: Sam Lantinga <slouken>
Severity: normal    
Priority: P2 CC: sezeroz
Version: HG 2.1   
Hardware: x86_64   
OS: Linux   
Attachments: [PATCH] Respect maximum RLIMIT_RTTIME when setting Linux thread priority

Description Andrew Eikum 2020-08-25 15:55:49 UTC
Created attachment 4448 [details]
[PATCH] Respect maximum RLIMIT_RTTIME when setting Linux thread priority

Currently the code to set RLIMIT_RTTIME doesn't actually make any changes. The rtkit daemon requires the process's RLIMIT_RTTIME to be below some configurable value. This patch queries that value and then uses it to cap our max RLIMIT_RTTIME setting. This lets the process achieve RT priority via rtkit.
Comment 1 Ozkan Sezer 2020-11-12 04:15:57 UTC
Patch doesn't apply since https://hg.libsdl.org/SDL/rev/535a3a1a7a7e
Comment 2 Andrew Eikum 2020-11-12 14:24:04 UTC
Thanks, Ozkan. It looks like the commit you point to has made this patch unnecessary. I'm unsure about the rlim_cur setting in the current code, but presumably it was tested and working.
Comment 3 Andrew Eikum 2020-11-12 14:24:33 UTC
Resolving.