Bug 196849

Summary: WebThread should run at a higher priority than user initiated
Product: WebKit Reporter: Ryosuke Niwa <rniwa>
Component: New BugsAssignee: Ryosuke Niwa <rniwa>
Status: RESOLVED FIXED    
Severity: Normal CC: ddkilzer, ggaren, koivisto, webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Fixes the bug
none
Fixes the bug ggaren: review+

Description Ryosuke Niwa 2019-04-11 21:02:34 PDT
WebThread should run at a higher priority than user initiated
Comment 1 Ryosuke Niwa 2019-04-11 21:03:01 PDT
<rdar://problem/46851062>
Comment 2 Ryosuke Niwa 2019-04-11 21:05:28 PDT
Created attachment 367282 [details]
Fixes the bug
Comment 3 Ryosuke Niwa 2019-04-11 21:05:30 PDT
<rdar://problem/46851062>
Comment 4 Ryosuke Niwa 2019-04-11 21:06:09 PDT
Created attachment 367283 [details]
Fixes the bug
Comment 5 Geoffrey Garen 2019-04-11 22:20:50 PDT
Can you include a description of the workload you used to qualify this change, and the improvement you saw?
Comment 6 Geoffrey Garen 2019-04-11 22:21:44 PDT
Comment on attachment 367283 [details]
Fixes the bug

View in context: https://bugs.webkit.org/attachment.cgi?id=367283&action=review

r=me

> Source/WebCore/platform/ios/wak/WebCoreThread.mm:670
> -    pthread_attr_setstacksize(&tattr, 200 * 4096);
> +    pthread_attr_setstacksize(&tattr, 800 * KB);

I'm pretty sure this change is harmless -- but it doesn't really seem related to this bug.
Comment 7 Ryosuke Niwa 2019-04-11 23:36:04 PDT
(In reply to Geoffrey Garen from comment #6)
> Comment on attachment 367283 [details]
> Fixes the bug
> 
> View in context:
> https://bugs.webkit.org/attachment.cgi?id=367283&action=review
> 
> r=me
> 
> > Source/WebCore/platform/ios/wak/WebCoreThread.mm:670
> > -    pthread_attr_setstacksize(&tattr, 200 * 4096);
> > +    pthread_attr_setstacksize(&tattr, 800 * KB);
> 
> I'm pretty sure this change is harmless -- but it doesn't really seem
> related to this bug.

Oh ya, I forgot to mention in the change log. I'm just replaying 200 * 4096 by 200 * 4 * 1024 -> 800 * 1024 -> 800 KB. I think the code comes from when page size was 4KB in iOS.
Comment 8 Ryosuke Niwa 2019-04-12 13:37:11 PDT
(In reply to Geoffrey Garen from comment #5)
> Can you include a description of the workload you used to qualify this
> change, and the improvement you saw?

Added: "This improves the blocked time in StartWebThread from 2~3ms to 250μs while cold launching iBooks to an opened book."
Comment 9 Ryosuke Niwa 2019-04-12 13:37:40 PDT
Committed r244229: <https://trac.webkit.org/changeset/244229>