Trailing guard pages for huge allocations
Categories
(Core :: Memory Allocator, enhancement)
Tracking
()
People
(Reporter: gcp, Assigned: gcp)
References
(Blocks 1 open bug)
Details
Attachments
(1 file, 7 obsolete files)
Split off from bug 1446040. Trailing guard pages for normal allocations are relatively easier, and should be able to land ahead of the rest of the work.
Assignee | ||
Comment 1•5 years ago
|
||
https://treeherder.mozilla.org/#/jobs?repo=try&revision=b16f785ee0e7783b15a8fb1ae46555453e948b73
Assignee | ||
Comment 2•5 years ago
|
||
https://treeherder.mozilla.org/#/jobs?repo=try&revision=f0fa8a77d9e17a32f5babb2e22ba6456bf2fb9df
Assignee | ||
Comment 3•5 years ago
|
||
https://treeherder.mozilla.org/#/jobs?repo=try&revision=6a391630719fd3ae8a8ecd838de23199b6f58ceb
Assignee | ||
Comment 4•5 years ago
|
||
Assignee | ||
Comment 5•5 years ago
|
||
Changes compared to Matt's original patch:
- Make sure guard pages are always applied on non-Windows systems on realloc.
- Deal with a nasty edge case where we realloc and now there's no more room for a guard.
- Simplify code to remove separate Windows (DECOMMIT) and non-Windows paths.
- apply/remove guard calls the (de)commit function so memory gets tagged.
- Poison zone between the end of the allocation and the start of the guard.
- Fixes for the tests on non-Windows, add test to check for guards when enlarging.
- Tiny optimization to zero only the part of the chunk that will be used.
Assignee | ||
Updated•5 years ago
|
Assignee | ||
Comment 6•5 years ago
|
||
https://treeherder.mozilla.org/#/jobs?repo=try&revision=1afb6cdca6fec15b9a71fa40e1cf7e29f3046f5a
Assignee | ||
Comment 7•5 years ago
|
||
https://treeherder.mozilla.org/#/jobs?repo=try&revision=de657d4c84b651ec6c85cd55e091ff81c379003b
Assignee | ||
Comment 8•5 years ago
|
||
Assignee | ||
Comment 9•5 years ago
|
||
Depends on D21563
Assignee | ||
Comment 10•5 years ago
|
||
Depends on D21565
Assignee | ||
Comment 11•5 years ago
|
||
Depends on D21566
Updated•5 years ago
|
Updated•5 years ago
|
Updated•5 years ago
|
Updated•5 years ago
|
Assignee | ||
Comment 12•5 years ago
|
||
Depends on D21567
Assignee | ||
Comment 13•5 years ago
|
||
https://treeherder.mozilla.org/#/jobs?repo=try&revision=702ec3f7887bad157f464d33d0df134de8a8bf85
Assignee | ||
Comment 14•5 years ago
|
||
https://treeherder.mozilla.org/#/jobs?repo=try&revision=924dc99e1cc23c5e30a5613193bf37fb9ac06591
Assignee | ||
Comment 15•5 years ago
|
||
https://treeherder.mozilla.org/#/jobs?repo=try&revision=06fe48c084b065460c0c860d329b64c0cd1dc7b0
Assignee | ||
Comment 16•5 years ago
|
||
https://treeherder.mozilla.org/#/jobs?repo=try&revision=da2ab3b942d9a847e1261c1dfa8e8e894155e962
Assignee | ||
Comment 17•5 years ago
|
||
https://treeherder.mozilla.org/#/jobs?repo=try&revision=f89c74fd2843b0bb97b11675f253792d78ad529b
Assignee | ||
Comment 18•5 years ago
|
||
https://treeherder.mozilla.org/#/jobs?repo=try&revision=af93be76a47fd08c161b2362cad9450fd1498656
Assignee | ||
Comment 19•5 years ago
|
||
Updated•5 years ago
|
Updated•5 years ago
|
Updated•5 years ago
|
Assignee | ||
Comment 20•5 years ago
|
||
https://treeherder.mozilla.org/#/jobs?repo=try&revision=8ead783df3c5891f25221eae6ead8c892c5d9f10
Assignee | ||
Comment 21•5 years ago
|
||
https://treeherder.mozilla.org/#/jobs?repo=try&revision=bcaf91de0e7231d3df5a80cc8e526a458915511c
Assignee | ||
Comment 22•5 years ago
|
||
Hopefully the last try push, to check the final performance and memory impact.
Assignee | ||
Comment 23•5 years ago
|
||
I have an implementation for normal pages done in the way glandium suggested, i.e. by making the DECOMMIT logic the general case and then not allocating the final page during the initial run, together with some fixes to prevent that page being included in coalescing/extending. Need to do some more testing first though.
Assignee | ||
Comment 24•5 years ago
|
||
https://treeherder.mozilla.org/#/jobs?repo=try&revision=ced39480d6f36ca941e2e783034276a6e67ab6ed
Assignee | ||
Comment 25•5 years ago
|
||
Depends on D23292
Updated•5 years ago
|
Updated•5 years ago
|
Assignee | ||
Updated•5 years ago
|
Comment 26•5 years ago
|
||
bugherder |
Updated•5 years ago
|
Updated•5 years ago
|
Assignee | ||
Comment 27•5 years ago
|
||
Ouch, looks like moz-phab is clueless that the bug has been moved.
Comment 28•5 years ago
|
||
Comment on attachment 9052180 [details]
Bug 1537781 - Guard pages for normal allocations. r=glandium
Revision D24135 was moved to bug 1537781. Setting attachment 9052180 [details] to obsolete.
Comment 29•5 years ago
|
||
Comment on attachment 9047448 [details]
Bug 1537781 - Add a test for guard regions in runs. r=glandium
Revision D21566 was moved to bug 1537781. Setting attachment 9047448 [details] to obsolete.
Comment 30•5 years ago
|
||
glandium, any idea why we saw such a big memory win for this on macOS?
Comment 31•5 years ago
|
||
I think what's happening is that pages_decommit, which now just maps fresh new pages, is better at reducing RSS than when it was using madvise(MADV_FREE).
Updated•5 years ago
|
Description
•