Summary: | Implement the alwaysRunsAtBackgroundPriority WK2 setting using thread QoS | ||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Product: | WebKit | Reporter: | Andreas Kling <kling> | ||||||||||||||||
Component: | Web Template Framework | Assignee: | Andreas Kling <kling> | ||||||||||||||||
Status: | RESOLVED FIXED | ||||||||||||||||||
Severity: | Normal | CC: | barraclough, benjamin, buildbot, cdumez, cmarcelo, commit-queue, dbates, kling, rniwa | ||||||||||||||||
Priority: | P2 | Keywords: | InRadar, Performance | ||||||||||||||||
Version: | WebKit Nightly Build | ||||||||||||||||||
Hardware: | Unspecified | ||||||||||||||||||
OS: | Unspecified | ||||||||||||||||||
Attachments: |
|
Description
Andreas Kling
2017-01-24 14:54:03 PST
Created attachment 299634 [details]
WIP
Attachment 299634 [details] did not pass style-queue:
ERROR: Source/WebKit2/UIProcess/ChildProcessProxy.cpp:56: Should have a space between // and comment [whitespace/comments] [4]
ERROR: Source/WTF/wtf/Threading.cpp:146: Should have a space between // and comment [whitespace/comments] [4]
ERROR: Source/WTF/wtf/Threading.cpp:149: Should have a space between // and comment [whitespace/comments] [4]
ERROR: Source/WTF/wtf/Threading.cpp:150: Should have a space between // and comment [whitespace/comments] [4]
Total errors found: 4 in 17 files
If any of these errors are false positives, please file a bug against check-webkit-style.
This hook point is not early enough, we're still creating some WorkQueues with too high QoS level. Created attachment 299641 [details]
Patch for EWS
Okay, I think this will do the trick. Hooking in XPCServiceInitializer() means we set the QoS override before a ChildProcess object is constructed.
Created attachment 299643 [details]
Patch for review
Comment on attachment 299641 [details] Patch for EWS Attachment 299641 [details] did not pass mac-wk2-ews (mac-wk2): Output: http://webkit-queues.webkit.org/results/2943433 New failing tests: media/modern-media-controls/media-controller/media-controller-auto-hide-rewind-with-mouse-enter.html media/modern-media-controls/media-controller/media-controller-auto-hide-mouse-leave-after-play.html http/tests/misc/slow-loading-animated-image.html accessibility/mac/aria-multiple-liveregions-notification.html Created attachment 299655 [details]
Archive of layout-test-results from ews107 for mac-elcapitan-wk2
The attached test failures were seen while running run-webkit-tests on the mac-wk2-ews.
Bot: ews107 Port: mac-elcapitan-wk2 Platform: Mac OS X 10.11.6
Created attachment 299668 [details]
Patch for EWS again
Let's try that patch for EWS again, apparently there were a lot of flaky tests getting skipped today.
Comment on attachment 299668 [details] Patch for EWS again Attachment 299668 [details] did not pass mac-wk2-ews (mac-wk2): Output: http://webkit-queues.webkit.org/results/2944578 New failing tests: media/modern-media-controls/media-controller/media-controller-auto-hide-rewind-with-mouse-enter.html media/modern-media-controls/media-controller/media-controller-auto-hide-mouse-leave-after-play.html http/tests/misc/slow-loading-animated-image.html Created attachment 299680 [details]
Archive of layout-test-results from ews106 for mac-elcapitan-wk2
The attached test failures were seen while running run-webkit-tests on the mac-wk2-ews.
Bot: ews106 Port: mac-elcapitan-wk2 Platform: Mac OS X 10.11.6
Wait, there are two patches listed here. Which one is the good one? (In reply to comment #11) > Wait, there are two patches listed here. Which one is the good one? Sorry about the confusion. The "Patch for EWS" has the alwaysRunsAtBackgroundPriority setting hardcoded to "on", because I wanted to exercise the full suite of layout tests in this mode. The "Patch for review" is the one to actually read and review :) @Gavin, could you take a look at my changes and let me know what you think? Comment on attachment 299643 [details] Patch for review View in context: https://bugs.webkit.org/attachment.cgi?id=299643&action=review > Source/WTF/wtf/Threading.cpp:148 > +qos_class_t adjustedQOSClass(qos_class_t originalClass) > +{ > + if (globalQOSOverride != QOS_CLASS_UNSPECIFIED) > + return globalQOSOverride; > + return originalClass; > +} Since you are using setGlobalQOSOverride(QOS_CLASS_UTILITY) you are increasing the priority of the QOS_CLASS_BACKGROUND threads. Is that really the intention? Instead of an override should this rather be about setting a maximum QOS class? > Source/WebKit2/UIProcess/ChildProcessProxy.cpp:34 > +ChildProcessProxy::ChildProcessProxy(bool alwaysRunsAtBackgroundPriority) Enum would be more stylish. > Source/bmalloc/bmalloc/Heap.h:73 > + qos_class_t takeRequestedQOSClass() { return std::exchange(m_requestedQOSClass, QOS_CLASS_UNSPECIFIED); } > + void setQOSOverride(qos_class_t overrideClass) { m_requestedQOSClass = overrideClass; } Should the names be more specific, like "ScavengerThreadQOSClass"? Created attachment 300316 [details]
Patch for landing
Comment on attachment 300316 [details] Patch for landing Clearing flags on attachment: 300316 Committed r211482: <http://trac.webkit.org/changeset/211482> All reviewed patches have been landed. Closing bug. FYI, we have a fairly major Speedometer regression on iOS and this commit is in the range. This is not the only suspicious commit though. |