Reuse blob image tile buffers
Categories
(Core :: Graphics: WebRender, enhancement, P3)
Tracking
()
| Tracking | Status | |
|---|---|---|
| firefox131 | --- | fixed |
People
(Reporter: nical, Assigned: nical)
References
Details
Attachments
(1 file)
And make sure to deallocate the buffers on the thread that allocated them.
This should help a lot with reducing malloc contention. However since blob images can cause large allocation spikes, we have to be careful about releasing the memory eventually.
One way to go about this is to keep an Arc to the buffer on the worker thread that allocated. When we need a new buffer, traverse the list of allocated buffers and find one that has a refcount of 1, or allocate a new one. "Every now and then" (probably using a timer to schedule a task that happens once the scene builder hsa been idle for a couple of seconds), reduce the number of retained buffers.
| Assignee | ||
Comment 1•2 years ago
|
||
The tile pool keeps a strong reference to all of its allocations and reuses them when their reference count gets down to one.
Jemalloc only uses thread-local arenas for small allocations (<496 bytes) so it does not matter what thread the blob tiles which are typically much larger, are deallocated in.
Updated•2 years ago
|
Comment 3•2 years ago
|
||
| Assignee | ||
Updated•2 years ago
|
Comment 5•2 years ago
|
||
| Assignee | ||
Updated•2 years ago
|
Comment 8•2 years ago
|
||
(In reply to Pulsebot from comment #6)
Pushed by nsilva@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/4aa1704827b1
Add a blob tile pool. r=gfx-reviewers,gw
Perfherder has detected a talos performance change from push 4aa1704827b131756b1dac86994e6963a2ba144f.
Improvements:
| Ratio | Test | Platform | Options | Absolute values (old vs new) |
|---|---|---|---|---|
| 6% | tsvg_static | linux1804-64-shippable-qr | e10s fission stylo webrender | 51.85 -> 48.74 |
| 5% | tsvgx | linux1804-64-shippable-qr | e10s fission stylo webrender | 237.60 -> 226.26 |
| 4% | tsvgx | linux1804-64-shippable-qr | e10s fission stylo webrender | 236.83 -> 226.68 |
Details of the alert can be found in the alert summary, including links to graphs and comparisons for each of the affected tests.
If you need the profiling jobs you can trigger them yourself from treeherder job view or ask a sheriff to do that for you.
You can run these tests on try with ./mach try perf --alert 1741
For more information on performance sheriffing please see our FAQ.
Description
•