Closed Bug 965348 Opened 10 years ago Closed 10 years ago

nsSocketTransportService::Poll wakes up every second during spdy idle

Categories

(Core :: Networking, defect)

x86
macOS
defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla29

People

(Reporter: rvitillo, Assigned: mcmanus)

References

Details

Attachments

(1 file)

Steps to reproduce:

1) start Nightly (clean profile) with NSPR_LOG_MODULES=nsSocketTransport:5
2) notice that there is no periodic activity being logged
2) visit www.google.com and wait for the page to fully load; the periodic activity of nsSocketTransportService::Poll is being logged every second
3) visit about:blank; the periodic activity continues for about 2-3 mins even though we are just idling

Note that the browser needs to be in foreground.
Assignee: nobody → mcmanus
Status: NEW → ASSIGNED
roberto - there are some builds over here:
https://tbpl.mozilla.org/?tree=Try&rev=327cdfc56f14

can you try one out and see if it improves the situation for you?
Flags: needinfo?(rvitillo)
Blocks: 965392
Great job! The patch reduces significantly also the number of wakeups when idling on Google (see Bug 965392).
No longer blocks: 965392
Flags: needinfo?(rvitillo)
Did you mean to remove the blocking flag? (bug 965392 could probably be RESOLVED DUPLICATE of this bug though, unless there's more to do once this goes in)
Blocks: 965392
Comment on attachment 8368341 [details] [diff] [review]
control SocketTransportService::Poll tick during spdy idle

Review of attachment 8368341 [details] [diff] [review]:
-----------------------------------------------------------------

::: netwerk/protocol/http/nsHttpConnectionMgr.cpp
@@ +2439,5 @@
>      // The timer tick should be enabled if it is not already pending.
>      // Upon running the tick will rearm itself if there are active
>      // connections available.
>  
> +    if (mTimeoutTick && mTimeoutTickArmed){

nit: space between ) and {

@@ +2470,5 @@
>      MOZ_ASSERT(mTimeoutTick, "no readtimeout tick");
>  
>      LOG(("nsHttpConnectionMgr::TimeoutTick active=%d\n",
>           mNumActiveConns));
> +    mTimeoutTickNext = 3600;

It would be nice to have this as not a magic number (or at least a commented magic number)

@@ +2475,1 @@
>      mCT.Enumerate(TimeoutTickCB, this);

And also maybe note that this can change the value of mTimeoutTickNext (so it doesn't look like the next bit always ends up setting the delay to 3600s)
Attachment #8368341 - Flags: review?(hurley) → review+
Summary: nsSocketTransportService::Poll wakes up every second during idle → nsSocketTransportService::Poll wakes up every second during spdy idle
https://hg.mozilla.org/mozilla-central/rev/8f2ed4975219
Status: ASSIGNED → RESOLVED
Closed: 10 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla29
You need to log in before you can comment on or make changes to this bug.