Bug 103613 - WebKit2 child processes need to initialize timer coalescing policy on Mac.
Summary: WebKit2 child processes need to initialize timer coalescing policy on Mac.
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebKit2 (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Kiran Muppala
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-11-29 00:54 PST by Kiran Muppala
Modified: 2012-12-05 15:15 PST (History)
1 user (show)

See Also:


Attachments
Patch: Not ready for commit until stable OS builds available. (2.40 KB, patch)
2012-11-29 03:36 PST, Kiran Muppala
no flags Details | Formatted Diff | Diff
Patch (2.35 KB, patch)
2012-11-30 17:23 PST, Kiran Muppala
no flags Details | Formatted Diff | Diff
Patch (2.37 KB, patch)
2012-12-05 12:53 PST, Kiran Muppala
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Kiran Muppala 2012-11-29 00:54:51 PST
On Mac WebKit2 processes should initialize timer coalescing policy to match those of visible applications and later update it based on UI process visibility state.

This bug is for correctly initializing the policy during process launch.
Comment 1 Kiran Muppala 2012-11-29 03:36:04 PST
Created attachment 176697 [details]
Patch: Not ready for commit until stable OS builds available.
Comment 2 Kiran Muppala 2012-11-29 17:15:18 PST
<rdar://problem/12723211>
Comment 3 Mark Rowe (bdash) 2012-11-29 17:23:21 PST
Comment on attachment 176697 [details]
Patch: Not ready for commit until stable OS builds available.



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

> Source/WebKit2/Shared/mac/ChildProcessMac.mm:70
> +    // Set task_latency and task_throughput qos tiers as appropriate for a visible application.

"qos" should be written as QOS in the comment since it is an initialism.

> Source/WebKit2/Shared/mac/ChildProcessMac.mm:73
> +    struct task_qos_policy qosinfo;
> +    qosinfo.task_latency_qos_tier = LATENCY_QOS_TIER_0;
> +    qosinfo.task_throughput_qos_tier = THROUGHPUT_QOS_TIER_0;

This could be initialized on the same line as the declaration:
struct task_qos_policy qosinfo = { LATENCY_QOS_TIER_0, THROUGHPUT_QOS_TIER_0 };
Comment 4 Kiran Muppala 2012-11-30 17:23:10 PST
Created attachment 177061 [details]
Patch
Comment 5 Kiran Muppala 2012-11-30 17:25:07 PST
(In reply to comment #3)
> (From update of attachment 176697 [details])
> View in context: https://bugs.webkit.org/attachment.cgi?id=176697&action=review
> 
> > Source/WebKit2/Shared/mac/ChildProcessMac.mm:70
> > +    // Set task_latency and task_throughput qos tiers as appropriate for a visible application.
> 
> "qos" should be written as QOS in the comment since it is an initialism.
> 

Fixed in the comment and the ChangeLog.

> > Source/WebKit2/Shared/mac/ChildProcessMac.mm:73
> > +    struct task_qos_policy qosinfo;
> > +    qosinfo.task_latency_qos_tier = LATENCY_QOS_TIER_0;
> > +    qosinfo.task_throughput_qos_tier = THROUGHPUT_QOS_TIER_0;
> 
> This could be initialized on the same line as the declaration:
> struct task_qos_policy qosinfo = { LATENCY_QOS_TIER_0, THROUGHPUT_QOS_TIER_0 };

Thanks, this looks better.  Replaced multi statement initializer with above one line initializer.
Comment 6 WebKit Review Bot 2012-12-05 12:41:27 PST
Comment on attachment 177061 [details]
Patch

Rejecting attachment 177061 [details] from commit-queue.

Failed to run "['/mnt/git/webkit-commit-queue/Tools/Scripts/webkit-patch', '--status-host=queues.webkit.org', '-..." exit_code: 1

/mnt/git/webkit-commit-queue/Source/WebKit2/ChangeLog neither lists a valid reviewer nor contains the string "Unreviewed" or "Rubber stamp" (case insensitive).

Full output: http://queues.webkit.org/results/15151613
Comment 7 Kiran Muppala 2012-12-05 12:53:16 PST
Created attachment 177814 [details]
Patch
Comment 8 Kiran Muppala 2012-12-05 12:54:43 PST
(In reply to comment #7)
> Created an attachment (id=177814) [details]
> Patch

Commit failed because the "Reviewer" line in ChangeLog read "Reviewed by NOBODY." instead of "Reviewed by NOBODY (OOPS!)."  So, fixed the reviewer line in ChangeLog.  No other changes.
Comment 9 WebKit Review Bot 2012-12-05 15:15:09 PST
Comment on attachment 177814 [details]
Patch

Clearing flags on attachment: 177814

Committed r136766: <http://trac.webkit.org/changeset/136766>
Comment 10 WebKit Review Bot 2012-12-05 15:15:12 PST
All reviewed patches have been landed.  Closing bug.