freeze UA sheet shared memory and enable the feature
Categories
(Core :: CSS Parsing and Computation, enhancement, P2)
Tracking
()
Tracking | Status | |
---|---|---|
firefox70 | --- | fixed |
People
(Reporter: heycam, Assigned: heycam)
References
(Blocks 1 open bug)
Details
(Keywords: perf-alert)
Attachments
(3 files, 2 obsolete files)
Bug 1474793 will be landed with the pref disabled, since we need to wait until bug 1479960 (shared memory freezing) is available.
Assignee | ||
Updated•5 years ago
|
Comment 1•5 years ago
|
||
Now that bug 1479960 is fixed, can we turn this on? :)
Assignee | ||
Comment 2•5 years ago
|
||
Hi Jed, I notice in the comments for SharedMemory::Freeze
that it will unmap the shared memory in the current process. Is this a fundamental design requirement? Currently, the shared memory UA style sheets benefit from having the same shared memory copy of the sheet data in the parent and child processes. I can easily change this to keep a unique copy in the parent process if needed. Or can I just map it again immediately in the parent process, and I'll have a frozen read only view of it?
Comment 3•5 years ago
|
||
(In reply to Cameron McCormack (:heycam) from comment #2)
Hi Jed, I notice in the comments for
SharedMemory::Freeze
that it will unmap the shared memory in the current process. Is this a fundamental design requirement? Currently, the shared memory UA style sheets benefit from having the same shared memory copy of the sheet data in the parent and child processes. I can easily change this to keep a unique copy in the parent process if needed. Or can I just map it again immediately in the parent process, and I'll have a frozen read only view of it?
Yes, you can map it again after it's frozen.
However, the address space could be claimed by another thread in the meantime. If that's a showstopper, it would be possible to avoid it, more or less: on Unix we can atomically replace the mapping with MAP_FIXED
, but on Windows there doesn't seem to be an equivalent, so we'd just have to remove write permission and hope nobody accidentally re-adds it. (This shouldn't be a security problem because it's in a trusted process, but it seems worthwhile to prevent accidental misuse, and some of the backends will require not trying to write that mapping, and I'd like to keep things as consistent across platforms as possible.) And I'd have to write more code to implement all that. So, hopefully it's acceptable to fall back to copying / regenerating the data in rare cases.
Assignee | ||
Comment 4•5 years ago
|
||
Thanks, I think it's fine to fall back to using a unique copy in that case, and my guess is that remapping immediately is going to work most of the time, since we already chose an address some distance away from other allocations.
Updated•5 years ago
|
Assignee | ||
Comment 5•5 years ago
|
||
Assignee | ||
Comment 6•5 years ago
|
||
Assignee | ||
Comment 7•5 years ago
|
||
Assignee | ||
Updated•5 years ago
|
Comment 8•5 years ago
|
||
(In reply to Cameron McCormack (:heycam) from comment #4)
Thanks, I think it's fine to fall back to using a unique copy in that case, and my guess is that remapping immediately is going to work most of the time, since we already chose an address some distance away from other allocations.
It would be good to have telemetry to confirm/monitor this. Should we have a separate bug for that?
Assignee | ||
Comment 9•5 years ago
|
||
Filed bug 1562060. (And also to measure the rate that we fail to map in the content process, too.)
Comment 10•5 years ago
|
||
There are some r+ patches which didn't land and no activity in this bug for 2 weeks.
:heycam, could you have a look please?
For more information, please visit auto_nag documentation.
Assignee | ||
Comment 11•5 years ago
|
||
https://treeherder.mozilla.org/#/jobs?repo=try&revision=b5a193cc859ba448e8687a15587fe08d8d0fd440
https://treeherder.mozilla.org/#/jobs?repo=try&revision=a85989f64a7b0479df662b2b66f2337267656b12
Comment 12•5 years ago
|
||
Pushed by cmccormack@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/06da212d37f5 Part 1: Freeze UA sheet shared memory. r=jwatt https://hg.mozilla.org/integration/autoland/rev/9c5be5540874 Part 2: Enable shared UA style sheets. r=jwatt
Comment 13•5 years ago
|
||
This is caused by the a11y failures.
Backed out 2 changesets (bug 1533569) for causing Android and Win AArch raptors to perma fail and automation.py tier 2 perma fails
Backout: https://hg.mozilla.org/integration/autoland/rev/e79de5e9316a7445de73db36b60967f8d4d84984
Push with failure: https://treeherder.mozilla.org/#/jobs?repo=autoland&resultStatus=testfailed%2Cbusted%2Cexception&revision=9c5be55408747d25df81595eb6c14a9ec84081d9
Failure logs:
https://treeherder.mozilla.org/logviewer.html#/jobs?job_id=262123499&repo=autoland&lineNumber=1062
https://treeherder.mozilla.org/logviewer.html#/jobs?job_id=262125143&repo=autoland&lineNumber=1404
Assignee | ||
Comment 14•5 years ago
|
||
Assignee | ||
Comment 15•5 years ago
|
||
Assignee | ||
Comment 16•5 years ago
|
||
400 KiB is just too small for Android ARM64.
Assignee | ||
Comment 17•5 years ago
|
||
Updated•5 years ago
|
Updated•5 years ago
|
Assignee | ||
Comment 18•5 years ago
|
||
Comment 19•5 years ago
|
||
Pushed by cmccormack@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/43c411ccf445 Part 1: Freeze UA sheet shared memory. r=jwatt https://hg.mozilla.org/integration/autoland/rev/216edfe6b998 Part 2: Enable shared UA style sheets. r=jwatt https://hg.mozilla.org/integration/autoland/rev/70e4542f1434 Part 3: Increase shared memory size. r=jwatt
Comment 20•5 years ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/43c411ccf445
https://hg.mozilla.org/mozilla-central/rev/216edfe6b998
https://hg.mozilla.org/mozilla-central/rev/70e4542f1434
Updated•5 years ago
|
Comment 21•5 years ago
|
||
Backed out 3 changesets (Bug 1533569) for permafailing in text-decoration-color.html CLOSED TREE
Failure log: https://treeherder.mozilla.org/logviewer.html#/jobs?job_id=263237009&repo=autoland&lineNumber=10434
Backout: https://hg.mozilla.org/integration/autoland/rev/f2c8034d8148e6c4a76139e57e8aa3794b07b005
Assignee | ||
Comment 22•5 years ago
|
||
The failure mode of that test is just like that reported for the intermittents in bug 1574066, but perma-failing.
Comment 23•5 years ago
|
||
Pushed by cmccormack@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/39ea7a8fdbea Part 1: Freeze UA sheet shared memory. r=jwatt https://hg.mozilla.org/integration/autoland/rev/fcd5bfe0a6a7 Part 2: Enable shared UA style sheets. r=jwatt https://hg.mozilla.org/integration/autoland/rev/4ef6bd2cf54b Part 3: Increase shared memory size. r=jwatt
Assignee | ||
Updated•5 years ago
|
Comment 24•5 years ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/39ea7a8fdbea
https://hg.mozilla.org/mozilla-central/rev/fcd5bfe0a6a7
https://hg.mozilla.org/mozilla-central/rev/4ef6bd2cf54b
Comment 25•5 years ago
|
||
== Change summary for alert #22859 (as of Tue, 27 Aug 2019 05:32:05 GMT) ==
Improvements:
4% Base Content Heap Unclassified windows10-64-shippable opt 1,630,012.00 -> 1,559,872.00
4% Base Content Heap Unclassified windows10-64-shippable-qr opt 1,622,960.67 -> 1,555,689.33
4% Base Content Explicit linux64-shippable-qr opt 13,450,922.67 -> 12,949,333.33
4% Base Content Explicit linux64-shippable opt 13,406,720.00 -> 12,915,712.00
4% Base Content Explicit windows10-64-shippable opt 10,705,066.67 -> 10,321,920.00
4% Base Content Explicit windows10-64-shippable-qr opt 10,678,613.33 -> 10,297,856.00
3% Base Content Resident Unique Memory windows10-64-shippable opt 14,405,973.33 -> 13,959,168.00
3% Base Content Resident Unique Memory windows10-64-shippable-qr opt 14,263,978.67 -> 13,822,122.67
3% Base Content Resident Unique Memory windows10-64-shippable-qr opt 14,265,600.00 -> 13,827,413.33
For up to date results, see: https://treeherder.mozilla.org/perf.html#/alerts?id=22859
Comment 26•5 years ago
|
||
(In reply to Pulsebot from comment #19)
Pushed by cmccormack@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/43c411ccf445
Part 1: Freeze UA sheet shared memory. r=jwatt
https://hg.mozilla.org/integration/autoland/rev/216edfe6b998
Part 2: Enable shared UA style sheets. r=jwatt
https://hg.mozilla.org/integration/autoland/rev/70e4542f1434
Part 3: Increase shared memory size. r=jwatt
Those pushes caused the regression below:
== Change summary for alert #22840 (as of Sat, 24 Aug 2019 09:44:17 GMT) ==
Regressions:
19% raptor-tp6-google-firefox-cold fcp windows10-64-shippable-qr opt 310.38 -> 370.08
5% raptor-tp6-google-firefox-cold windows10-64-shippable-qr opt 315.56 -> 332.10
Improvements:
3% raptor-ares6-firefox windows10-64-shippable opt 59.49 -> 57.73
For up to date results, see: https://treeherder.mozilla.org/perf.html#/alerts?id=22840
(In reply to Pulsebot from comment #23)
Pushed by cmccormack@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/39ea7a8fdbea
Part 1: Freeze UA sheet shared memory. r=jwatt
https://hg.mozilla.org/integration/autoland/rev/fcd5bfe0a6a7
Part 2: Enable shared UA style sheets. r=jwatt
https://hg.mozilla.org/integration/autoland/rev/4ef6bd2cf54b
Part 3: Increase shared memory size. r=jwatt
and those pushes caused the improvements below (99% sure, waiting for the backfill to finish):
== Change summary for alert #22854 (as of Mon, 26 Aug 2019 20:52:59 GMT) ==
Improvements:
19% raptor-tp6-google-firefox-cold fcp windows10-64-shippable-qr opt 362.50 -> 293.17
19% raptor-tp6-microsoft-firefox loadtime macosx1014-64-shippable opt 580.50 -> 472.96
16% raptor-tp6-microsoft-firefox macosx1014-64-shippable opt 402.81 -> 336.64
16% raptor-tp6-imdb-firefox loadtime macosx1014-64-shippable opt 1,266.54 -> 1,069.29
16% raptor-tp6-reddit-firefox fcp macosx1014-64-shippable opt 421.12 -> 355.71
15% raptor-tp6-imdb-firefox macosx1014-64-shippable opt 672.39 -> 574.22
14% raptor-tp6-imdb-firefox fcp macosx1014-64-shippable opt 560.83 -> 482.88
12% raptor-tp6-amazon-firefox fcp macosx1014-64-shippable opt 513.73 -> 451.67
12% raptor-tp6-amazon-firefox macosx1014-64-shippable opt 623.84 -> 551.18
6% raptor-tp6-google-firefox-cold windows10-64-shippable-qr opt 330.72 -> 309.89
For up to date results, see: https://treeherder.mozilla.org/perf.html#/alerts?id=22854
Assignee | ||
Comment 27•5 years ago
|
||
OK, please needinfo me if you determine that there are still lingering regressions, thanks!
Updated•4 years ago
|
Description
•