WebThread should run at a higher priority than user initiated
authorrniwa@webkit.org <rniwa@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 12 Apr 2019 20:37:38 +0000 (20:37 +0000)
committerrniwa@webkit.org <rniwa@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 12 Apr 2019 20:37:38 +0000 (20:37 +0000)
commit1c6e19ce90ecf8e301fc870b5e368b6790018fdc
tree32255a058dabb2038808ef3405d3a00d933f7726
parent3f4c7f619d210881f96dd6f84aed38627e9c9dee
WebThread should run at a higher priority than user initiated
https://bugs.webkit.org/show_bug.cgi?id=196849
<rdar://problem/46851062>

Reviewed by Geoffrey Garen.

Use QOS_CLASS_USER_INTERACTIVE on WebThread with -10 relative priority so that WebThread
won't wait for other threads with priority 30-37 but does not content with the main thread.

Also removed the call to pthread_attr_setschedparam which disables QoS.

This improves the blocked time in StartWebThread from 2~3ms to 250μs while cold launching
iBooks to an opened book.

* platform/ios/wak/WebCoreThread.mm:
(StartWebThread): Replaced 200 * 4096 by 800 * KB for a better readability.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@244229 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Source/WebCore/ChangeLog
Source/WebCore/platform/ios/wak/WebCoreThread.mm