Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: 9a18171a13fbfc3aea4c53e341edb856eed21f02
https://github.com/WebKit/WebKit/commit/9a18171a13fbfc3aea4c53e341edb856eed21f02
Author: Justin Michaud <[email protected]>
Date: 2026-08-21 (Fri, 21 Aug 2026)
Changed paths:
M Source/JavaScriptCore/jit/JITWorklistThread.cpp
M Source/JavaScriptCore/wasm/WasmWorklist.cpp
M Source/WTF/wtf/AutomaticThread.cpp
M Source/WTF/wtf/AutomaticThread.h
M Source/WTF/wtf/PlatformGTK.cmake
M Source/WTF/wtf/PlatformJSCOnly.cmake
M Source/WTF/wtf/PlatformWPE.cmake
M Source/WTF/wtf/Threading.cpp
M Source/WTF/wtf/Threading.h
M Source/WTF/wtf/ThreadingEnums.h
A Source/WTF/wtf/linux/HighPriorityThreads.cpp
A Source/WTF/wtf/linux/HighPriorityThreads.h
R Source/WTF/wtf/linux/RealTimeThreads.cpp
R Source/WTF/wtf/linux/RealTimeThreads.h
M Source/WTF/wtf/posix/ThreadingPOSIX.cpp
M Source/WTF/wtf/win/ThreadingWin.cpp
M Source/WebCore/platform/audio/RealtimeAudioThread.cpp
M Source/WebKit/WebProcess/WebProcess.cpp
M Source/WebKit/WebProcess/glib/WebProcessGLib.cpp
M Tools/TestWebKitAPI/Tests/WTF/Threading.cpp
Log Message:
-----------
[Linux] Remove RT threads
https://bugs.webkit.org/show_bug.cgi?id=319535
Reviewed by Carlos Garcia Campos.
(reland due to macOS regression; now there is no behaviour change on darwin)
Patch 1 of 2, the second removes sched_yield.
RT threads showed a 10% win on MotionMark clamped to two cores. This
goes away if you turn off DVFS, so I believe the biggest mechanism
behind this is the increased effective clock speed.
We can recover that by setting the min clamp for DVFS directly. Most WPE
workloads probably won't be using DVFS (that is, they will be set to
performance), but this seems like the right call to me for desktop anyway.
Finally, in this 2-core case, we use nice to lower the priority of the
jit workers, and this gives us a small but noticable bump on SP3.
We use RTKit still to raise the priority of the former RT threads, which
gives a further small boost.
Canonical link: https://commits.webkit.org/318709@main
* Source/JavaScriptCore/jit/JITWorklistThread.cpp:
(JSC::JITWorklistThread::JITWorklistThread):
* Source/JavaScriptCore/wasm/WasmWorklist.cpp:
* Source/WTF/wtf/AutomaticThread.cpp:
(WTF::AutomaticThread::AutomaticThread):
(WTF::AutomaticThread::start):
* Source/WTF/wtf/AutomaticThread.h:
* Source/WTF/wtf/PlatformGTK.cmake:
* Source/WTF/wtf/PlatformJSCOnly.cmake:
* Source/WTF/wtf/PlatformWPE.cmake:
* Source/WTF/wtf/Threading.cpp:
(WTF::Thread::entryPoint):
(WTF::Thread::create):
(WTF::Thread::setCurrentThreadIsUserInteractive):
(WTF::Thread::setCurrentThreadIsUserInitiated):
(WTF::Thread::setCurrentThreadQOS):
(WTF::Thread::currentThreadQOS):
(WTF::Thread::currentThreadIsRealtime):
* Source/WTF/wtf/Threading.h:
* Source/WTF/wtf/ThreadingEnums.h:
(WTF::compilerThreadQOS):
* Source/WTF/wtf/linux/HighPriorityThreads.cpp: Added.
(WTF::HighPriorityThreads::singleton):
(WTF::HighPriorityThreads::HighPriorityThreads):
(WTF::HighPriorityThreads::registerThread):
(WTF::HighPriorityThreads::setEnabled):
(WTF::HighPriorityThreads::applyState):
(WTF::realTimeKitGetProperty):
(WTF::HighPriorityThreads::realTimeKitMakeThreadHighPriority):
(WTF::HighPriorityThreads::scheduleDiscardRealTimeKitProxy):
(WTF::HighPriorityThreads::discardRealTimeKitProxyTimerFired):
* Source/WTF/wtf/linux/HighPriorityThreads.h: Renamed from
Source/WTF/wtf/linux/RealTimeThreads.h.
* Source/WTF/wtf/linux/RealTimeThreads.cpp: Removed.
* Source/WTF/wtf/posix/ThreadingPOSIX.cpp:
(WTF::schedulingAttributesForQOS):
(WTF::logSchedulingAttributesFailure):
(WTF::Thread::establishHandle):
(WTF::Thread::updateSchedulingAttributes const):
(WTF::Thread::initializeSchedulingAttributes):
(WTF::Thread::initializeCurrentTLS):
* Source/WTF/wtf/win/ThreadingWin.cpp:
(WTF::Thread::updateSchedulingAttributes const):
(WTF::Thread::initializeSchedulingAttributes):
(WTF::Thread::initializeCurrentTLS):
* Source/WebCore/platform/audio/RealtimeAudioThread.cpp:
(WebCore::shouldCreateRealtimeThread):
(WebCore::createMaybeRealtimeAudioThread):
(): Deleted.
* Source/WebKit/WebProcess/WebProcess.cpp:
(WebKit::WebProcess::createWebPage):
(WebKit::WebProcess::removeWebPage):
(WebKit::WebProcess::pageActivityStateDidChange):
* Source/WebKit/WebProcess/glib/WebProcessGLib.cpp:
(WebKit::WebProcess::platformInitializeProcess):
* Tools/TestWebKitAPI/Tests/WTF/Threading.cpp:
(TestWebKitAPI::TEST(WTF_Thread, SchedulingAttributesFollowQOS)):
(TestWebKitAPI::TEST(WTF_Thread,
HighPriorityThreadsRestoresClampWhenReenabled)):
Canonical link: https://commits.webkit.org/319617@main
To unsubscribe from these emails, change your notification settings at
https://github.com/WebKit/WebKit/settings/notifications