Elude the memory arena lookup lock for main thread only arenas.
Categories
(Core :: Memory Allocator, enhancement, P1)
Tracking
()
Tracking | Status | |
---|---|---|
firefox118 | --- | fixed |
People
(Reporter: pbone, Assigned: pbone)
References
(Blocks 1 open bug)
Details
(Whiteboard: [sp3])
Attachments
(1 file)
mozjemalloc now supports main thread only arenas which avoids locking the arena itself. But looking up this arena involves taking a lock. We can avoid that by putting these arenas into a separate structure.
Assignee | ||
Comment 1•2 years ago
|
||
I have a patch started for this, here's the result:
It's not statistically significant (the confidence for all the tests & sub-tests is low) but I don't see a drawback. And when I profile it I see the proportion of time spent in GetById
is reduced - so long as nothing else is increased due to some other effect.
Comment 2•2 years ago
|
||
Good!
The difference is certainly noticeable in the focused profiles.
Before: https://share.firefox.dev/3Q71aKK
After: https://share.firefox.dev/3OiQk2W
This is evidence enough that this is worth doing. Not every improvement has to be justified by statistically significant benchmark results.
Assignee | ||
Comment 3•2 years ago
|
||
Great! that was my thought also but it's nice to confirm. Okay I'll tidy up the patch.
Updated•2 years ago
|
Updated•2 years ago
|
Assignee | ||
Comment 4•2 years ago
|
||
Comment 6•2 years ago
|
||
bugherder |
Description
•