Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: 2fa13e45b258fcf2d1c54d224562dc878fdd3373
https://github.com/WebKit/WebKit/commit/2fa13e45b258fcf2d1c54d224562dc878fdd3373
Author: Simon Pena <[email protected]>
Date: 2026-04-21 (Tue, 21 Apr 2026)
Changed paths:
M Source/WTF/wtf/linux/RealTimeThreads.cpp
Log Message:
-----------
[GLib] Set real time limits for the sched_setscheduler path
https://bugs.webkit.org/show_bug.cgi?id=312730
Reviewed by Michael Catanzaro.
When promoting threads to real-time, the code can take two paths:
one based on sched_setscheduler, another using D-Bus (rtkit or portal).
When taking the 2nd path, the code sets real time limits (mainly because
rtkit expects them). If the soft limit is exceeded, SIGXCPU is sent, if
the hard limit is exceeded, SIGKILL is sent.
When taking the first path, real-time threads would run unchecked,
possibly affecting the entire system.
This commit updates that path, setting the same limits --using the
same default 200000us value. If sched_setscheduler fails, this max is
still refined with rttmax.
Tested on X86 with NetworkProcess' Cache Storage thread running in RT.
Both the sched_setscheduler and the D-Bus paths successfully demote
threads exceeding their budgets. In order to test sched_setscheduler,
sudo prlimit --rtprio=99 --pid <MiniBrowser's parent> was used.
* Source/WTF/wtf/linux/RealTimeThreads.cpp:
(WTF::tightenRealTimeLimit):
(WTF::ensureRealTimeLimitSet):
(WTF::RealTimeThreads::promoteThreadToRealTime):
(WTF::RealTimeThreads::realTimeKitMakeThreadRealTime):
Canonical link: https://commits.webkit.org/311660@main
To unsubscribe from these emails, change your notification settings at
https://github.com/WebKit/WebKit/settings/notifications