Support remapping shared surfaces when there is virtual memory pressure
Categories
(Core :: Graphics: WebRender, defect, P3)
Tracking
()
People
(Reporter: aosmond, Assigned: aosmond)
References
(Blocks 3 open bugs, Regressed 1 open bug)
Details
Attachments
(5 files)
For 32-bit users, primarily Windows and Android, encounter OOMs due to low virtual memory address space a lot. If we could unmap the largest least recently used images when we hit memory pressure, and remap them on demand, that would likely help a lot. This would be similar to the volatile memory efforts without WebRender, but without relying upon an OS mechanism to do it.
Assignee | ||
Updated•4 years ago
|
Assignee | ||
Updated•4 years ago
|
Assignee | ||
Updated•4 years ago
|
Assignee | ||
Updated•4 years ago
|
Assignee | ||
Comment 1•4 years ago
|
||
Since we want to be able to unmap shared surfaces which are not in use,
we need to be able to map the data in as required. Blob images can
access shared surfaces via recordings which are used by DrawTargetSkia.
This patch makes it call Map/Unmap for data surfaces that require a data
pointer in Skia.
Assignee | ||
Comment 2•4 years ago
|
||
This patch exposes SharedMemoryBasic::Unmap for use by callers to allow
one to unmap memory out of our address space without destroying the
SharedMemoryBasic object itself. This will be used by later patches in
this series.
Assignee | ||
Comment 3•4 years ago
|
||
We want to use nsExpirationTracker to decide when we should unmap shared
surfaces from our address space. This relies upon the observer service
and we need to be both initialized and shutdown on the main thread to
add/remove the observer. SharedSurfacesParent is already initialized on
the main thread, and we just need to complete shutdown on the main
thread.
Assignee | ||
Comment 4•4 years ago
|
||
This patch adds an expiration tracker to decide when to unmap unused
shared surfaces from our address space to reclaim virtual memory. This
is only used on 32-bit builds of Firefox where there is meaningful
virtual address space pressure.
Assignee | ||
Comment 5•4 years ago
|
||
Before we start a resource update, we should check if we are virtual
memory pressured (32-bit Windows only). If so, pre-emptively unmap
shared surfaces until the pressure is relieved to try to avoid OOMs
elsewhere. This only applies to the GPU process because the parent
process actively watches its own memory pressure and dispatches a
low-memory event which our expiration tracker is an observer for.
Comment 7•4 years ago
|
||
Backed out for causing build bustages on SharedSurfacesParent.cpp.
Backout link: https://hg.mozilla.org/integration/autoland/rev/c8f281ec530b2264517fb231155ae339fb96e230
Failure log: https://treeherder.mozilla.org/logviewer?job_id=334569059&repo=autoland&lineNumber=37183
Comment 10•4 years ago
|
||
Backed out 5 changesets (Bug 1699224) for causing web platform and reftest failures CLOSED TREE
Log: https://treeherder.mozilla.org/logviewer?job_id=334593380&repo=autoland&lineNumber=3258
https://treeherder.mozilla.org/logviewer?job_id=334592075&repo=autoland&lineNumber=4791
https://treeherder.mozilla.org/logviewer?job_id=334591384&repo=autoland&lineNumber=5534
https://treeherder.mozilla.org/logviewer?job_id=334594189&repo=autoland&lineNumber=3850
https://treeherder.mozilla.org/logviewer?job_id=334593578&repo=autoland&lineNumber=4929
https://treeherder.mozilla.org/logviewer?job_id=334593441&repo=autoland&lineNumber=1733
Backout: https://hg.mozilla.org/integration/autoland/rev/ad6d764bc67107103d3dcafffa3c8cc532ac4748
Comment 11•4 years ago
|
||
Comment 12•4 years ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/66b86bed3d06
https://hg.mozilla.org/mozilla-central/rev/9aac5a079130
https://hg.mozilla.org/mozilla-central/rev/db4b82029686
https://hg.mozilla.org/mozilla-central/rev/cd7cfc8fc140
https://hg.mozilla.org/mozilla-central/rev/1646c323910d
Updated•4 years ago
|
Updated•4 years ago
|
Updated•3 years ago
|
Description
•