Closed Bug 1921908 Opened 1 year ago Closed 10 months ago

Optimise decommitting memory from the spare chunk

Categories

(Core :: Memory Allocator, enhancement)

enhancement

Tracking

()

RESOLVED FIXED
145 Branch
Tracking Status
firefox145 --- fixed

People

(Reporter: pbone, Assigned: pbone)

References

(Blocks 1 open bug)

Details

(Whiteboard: [sp3])

Attachments

(4 files)

In mozjemalloc when we decommit memory it may be better to decommit from the spare chunk first - since that's typically the last used memory. Also we can possibly commit multiple non-contiguous runs of pages with a single system call.

Decommit non-contigious runs of dirty pages when other free pages separate
them. For example if there are pages:

__DDDFFDFDD__

D - Dirty
F - Free
_ - other/used.

Decommit all the dirty and free pages above with a single system call.

Whiteboard: [sp3]

This improves "pages returned per system call" from 11.39 to 15.78, the median doesn't move as much so we can say that it's catching more outliers, but when it does it is helpful. The median time for a purge improves but I can't tell if it's significant.

Purge stats now show the number of purged and dirty pages separately.

Depends on: 1929467
Blocks: 1980056
Attachment #9428202 - Attachment description: WIP: Bug 1921908 - pt 1. Purge from the spare chunk first → Bug 1921908 - pt 1. Purge from the spare chunk first r=glandium
Attachment #9428203 - Attachment description: WIP: Bug 1921908 - pt 2. Decommit non-contigious runs of dirty pages → Bug 1921908 - pt 2. Decommit non-contigious runs of dirty pages r=glandium
Attachment #9428204 - Attachment description: WIP: Bug 1921908 - pt 3. Use else-if for mutually exclusive conditions → Bug 1921908 - pt 3. Use else-if for mutually exclusive conditions r=glandium
Attachment #9502349 - Attachment description: WIP: Bug 1921908 - pt 4. Update purge stats to show extra purged pages → Bug 1921908 - pt 4. Update purge stats to show extra purged pages r=glandium
Blocks: 1987055
No longer blocks: 1980056
QA Whiteboard: [qa-triage-done-c146/b145]
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: