Use MADV_FREE_REUSE before using decommitted memory again on OSX, as per https://stackoverflow.com/questions/7718964/how-can-i-force-macos-to-release-madv-freed-pages
Categories
(Core :: JavaScript: GC, defect, P3)
Tracking
()
Tracking | Status | |
---|---|---|
firefox86 | --- | fixed |
People
(Reporter: sfink, Assigned: sfink)
References
Details
Attachments
(2 files)
In reading through various things, I noticed that apparently on OSX it is intended that if you use MADV_FREE_REUSABLE to decommit memory and report that decommit to the OS's statistics, that you are then expected to do MADV_FREE_REUSE before using the memory again.
I don't know what happens in practice if you don't.
Assignee | ||
Comment 1•4 years ago
|
||
Updated•4 years ago
|
Assignee | ||
Comment 2•4 years ago
|
||
This made no difference to anything but RSS measures. Looking at eg "Resident Fresh start opt tp6", it increases RSS by around 30%.
The hypothesis is that without MADV_FREE_REUSE, some amount of memory is in use but not counted in the RSS. So this new measure should be better. But it would be nice to have a way to cross-check against some other measurement. I think I need someone more familiar with OSX memory management. I'll try glandium.
Assignee | ||
Comment 4•4 years ago
|
||
Updated•4 years ago
|
Pushed by sfink@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/fe8bfd66cd81 Handle madvise returning EAGAIN. r=glandium
Comment 6•4 years ago
|
||
bugherder |
Assignee | ||
Comment 7•4 years ago
|
||
Performance sheriffs: I'm going to land the MADV_FREE_REUSE patch. I expect this to regress RSS size measures on OSX, possibly by quite a large amount. I still want to keep the patch, because the new measures will be more accurate.
Pushed by sfink@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/ed96e8c21b5a Use MADV_FREE_REUSE before using decommitted memory again on OSX, as per https://bugs.chromium.org/p/chromium/issues/detail?id=823915 r=glandium
Comment 9•4 years ago
|
||
bugherder |
Description
•