Reduce main thread use in quota manager to the minimum

RESOLVED FIXED in Firefox 67

Status

()

enhancement
P2
normal
RESOLVED FIXED
6 months ago
5 months ago

People

(Reporter: janv, Assigned: janv)

Tracking

(Depends on 1 bug)

Trunk
mozilla67
Points:
---
Dependency tree / graph

Firefox Tracking Flags

(firefox67 fixed)

Details

Attachments

(18 attachments)

47 bytes, text/x-phabricator-request
Details | Review
47 bytes, text/x-phabricator-request
Details | Review
47 bytes, text/x-phabricator-request
Details | Review
47 bytes, text/x-phabricator-request
Details | Review
47 bytes, text/x-phabricator-request
Details | Review
47 bytes, text/x-phabricator-request
Details | Review
47 bytes, text/x-phabricator-request
Details | Review
47 bytes, text/x-phabricator-request
Details | Review
47 bytes, text/x-phabricator-request
Details | Review
47 bytes, text/x-phabricator-request
Details | Review
47 bytes, text/x-phabricator-request
Details | Review
47 bytes, text/x-phabricator-request
Details | Review
47 bytes, text/x-phabricator-request
Details | Review
47 bytes, text/x-phabricator-request
Details | Review
47 bytes, text/x-phabricator-request
Details | Review
47 bytes, text/x-phabricator-request
Details | Review
47 bytes, text/x-phabricator-request
Details | Review
47 bytes, text/x-phabricator-request
Details | Review

This is needed for LSNG to eliminate chances for dead locks.

Assignee: nobody → jvarga
Blocks: 1517090
Status: NEW → ASSIGNED
Summary: Reduce main thread use in quota manager to the minumum → Reduce main thread use in quota manager to the minimum

Jan is working on this, so I mark it as P2 for now.

Priority: -- → P2
Attachment #9046107 - Attachment is obsolete: true
Attachment #9046107 - Attachment is obsolete: false
Attachment #9046106 - Attachment description: Bug 1526891 - Part 1: Add support for simple URIs to rust url; r=nika → Bug 1526891 - Part 1: Change handling of indexeddb:// from simple URI to standard URL; r=asuth
Attachment #9046107 - Attachment description: Bug 1526891 - Part 2: Make it possible to use MozURL by QuotaManager for all URIs (instead of using nsIPrincipal); r=nika → Bug 1526891 - Part 2: Make it possible to use MozURL by QuotaManager for all URIs (instead of using nsIPrincipal); r=nika,asuth
Pushed by jvarga@mozilla.com:
https://hg.mozilla.org/integration/mozilla-inbound/rev/910b832dbbf6
Part 1: Change handling of indexeddb:// from simple URI to standard URL; r=asuth
https://hg.mozilla.org/integration/mozilla-inbound/rev/875bba6627b3
Part 2: Make it possible to use MozURL by QuotaManager for all URIs (instead of using nsIPrincipal); r=nika,asuth
https://hg.mozilla.org/integration/mozilla-inbound/rev/cd67c16e6554
Part 3: Get origin and base domain strings using MozURL for all URIs; r=asuth
https://hg.mozilla.org/integration/mozilla-inbound/rev/d6d4cb60bb71
Part 4: Add QuotaManager::IsPrincipalInfoValid checks to all quota clients; r=asuth
https://hg.mozilla.org/integration/mozilla-inbound/rev/8173a37df52b
Part 5: Allow calling NextGenLocalStorageEnabled on any thread in the parent process; r=asuth
https://hg.mozilla.org/integration/mozilla-inbound/rev/4733f0d7f7c5
Part 6: Introduce InitializeQuotaManager and call it in nsLayoutStatics::Initialize; r=asuth
https://hg.mozilla.org/integration/mozilla-inbound/rev/bb96024458d0
Part 7: Move base dir path initialization to a profile observer; r=asuth
https://hg.mozilla.org/integration/mozilla-inbound/rev/1213eb6430d9
Part 8: Move pref initialization to InitializeQuotaManager; r=asuth
https://hg.mozilla.org/integration/mozilla-inbound/rev/5d0241e1bc0a
Part 9: Send an async IPC message instead of dispatching a runnable to the PBackground thread when aborting operations for process; r=asuth
https://hg.mozilla.org/integration/mozilla-inbound/rev/1afb51b4bf31
Part 10: Fix a content process leak by closing databases at xpcom-shutdown; r=asuth
https://hg.mozilla.org/integration/mozilla-inbound/rev/c8434f83fb59
Part 11: Initiate asynchronous deletion of unreferenced files in IDB databases directly on the PBackground thread instead of going through the main thread; r=asuth
https://hg.mozilla.org/integration/mozilla-inbound/rev/3aea75627220
Part 12: Merge ShutdownObserver with Observer; r=asuth
https://hg.mozilla.org/integration/mozilla-inbound/rev/992bfd5a7b28
Part 13: Send an async IPC message instead of dispatching a runnable to the PBackground thread when shutting down quota manager; r=asuth
https://hg.mozilla.org/integration/mozilla-inbound/rev/830813029a78
Part 14: Move storage service initialization to InitializeQuotaManager; r=asuth
https://hg.mozilla.org/integration/mozilla-inbound/rev/5e8ac40eca96
Part 15: Remove CreateRunnable; r=asuth
https://hg.mozilla.org/integration/mozilla-inbound/rev/85e6118f8a00
Part 16: Verify principalInfo before creating any parent actors; r=asuth
https://hg.mozilla.org/integration/mozilla-inbound/rev/cc55c37b5036
Part 17: Remove initialization on main thread from quota request parent actors; r=asuth
https://hg.mozilla.org/integration/mozilla-inbound/rev/7e5e1c5a692d
Part 18: Remove main thread use from StorageOperationBase; r=asuth

Hey, it looks like this added a static constructor on Linux64. The number increased from 102 => 103:

https://treeherder.mozilla.org/perf.html#/graphs?series=mozilla-inbound,1468543,1,2

Maybe we can fix it easily by marking something constexpr or making it non-global? :)

(I noticed this because I recently improved it from 103 to 102, bug 1533070).

Flags: needinfo?(jvarga)

I'll take a look.

Depends on: 1533741
Depends on: 1533788
Depends on: 1534202
Depends on: 1536596

(In reply to Jan de Mooij [:jandem] from comment #23)

Hey, it looks like this added a static constructor on Linux64. The number increased from 102 => 103:

https://treeherder.mozilla.org/perf.html#/graphs?series=mozilla-inbound,1468543,1,2

Maybe we can fix it easily by marking something constexpr or making it non-global? :)

(I noticed this because I recently improved it from 103 to 102, bug 1533070).

We fixed it in bug 1534211.

Flags: needinfo?(jvarga)

(In reply to Jan Varga [:janv] from comment #25)

We fixed it in bug 1534211.

Great \o/

You need to log in before you can comment on or make changes to this bug.