Try to pre-commit unmapped pages within chunks during a page load.
Categories
(Core :: Memory Allocator, enhancement)
Tracking
()
People
(Reporter: pbone, Assigned: pbone)
References
Details
Attachments
(2 obsolete files)
While discussing Bug 1857841 smaug had an idea to pre-commit memory pages when a page load is initiated but the browser is idle (eg: waiting for the network or off-thread HTML parsing). This would be an excellent time to fill up mozjemalloc's page cache* so that when allocations are requested we don't need to wait on system calls, especially in the DOMArena.
He said we could try to call it for example here https://searchfox.org/mozilla-central/rev/6eb2ebcafb1b4a8576eb513e6cd2c61e3f3ae6dc/dom/base/nsJSEnvironment.cpp#1696 with the call to the minor GC.
*: mozjemalloc doesn't really have a "page cache", it has a "dirty page cache" and these pages aren't dirty. "Fill the page cache" is the simple lie. The truth is more like ensure we first have a concept of fresh (not dirty but free) pages (probably in Bug 1857841) and then to consider both of these together as the "page cache". At least in terms of counting the number of pages. For now we'll manage them as one (we can change that later).
| Assignee | ||
Updated•2 years ago
|
| Assignee | ||
Updated•2 years ago
|
| Assignee | ||
Comment 1•2 years ago
|
||
| Assignee | ||
Comment 2•2 years ago
|
||
Comment 3•2 years ago
|
||
Comment on attachment 9391384 [details]
WIP: Bug 1867197 - Refactor nsJSContext::MaybeRunNextCollectorSlice()
Revision D204726 was moved to bug 1885859. Setting attachment 9391384 [details] to obsolete.
Comment 4•2 years ago
|
||
Comment on attachment 9391385 [details]
WIP: Bug 1867197 - Relax rules about running a minor GC while waiting for a page
Revision D204727 was moved to bug 1885859. Setting attachment 9391385 [details] to obsolete.
Description
•