Closed
Bug 994054
Opened 11 years ago
Closed 11 years ago
GenerationalGC: Octane-raytrace spends a lot of time in updateDecommittedRegion/madvise
Categories
(Core :: JavaScript Engine, defect)
Core
JavaScript Engine
Tracking
()
RESOLVED
FIXED
mozilla31
People
(Reporter: jandem, Assigned: terrence)
References
(Blocks 1 open bug)
Details
Attachments
(1 file)
(deleted),
patch
|
jandem
:
review+
|
Details | Diff | Splinter Review |
On Octane-raytrace, I see a ton of time under madvise on OS X, 32-bit. I think most of these are coming from shrinkAllocableSpace -> updateDecommittedRegion -> MarkPagesUnused (probably means we keep growing and shrinking the nursery).
Commenting out the MarkPagesUnused call in Nursery::updateDecommittedRegion wins at least 25% on Octane-raytrace, so fixing this could be a pretty big win.
(Win may be different on Linux/Windows as it depends on the madvise/VirtualProtect implementation.)
Reporter | ||
Comment 1•11 years ago
|
||
(In reply to Jan de Mooij [:jandem] from comment #0)
> (Win may be different on Linux/Windows as it depends on the
> madvise/VirtualProtect implementation.)
Er, VirtualAlloc.
Comment 2•11 years ago
|
||
IIRC, madvise is absurdly slow on OSX in particular.
Reporter | ||
Comment 3•11 years ago
|
||
Requesting needinfo to make sure this doesn't slip through the cracks. Relatively low-hanging perf fruit, at least on OS X, and it may affect other benchmarks/websites even more than raytrace.
Flags: needinfo?(terrence)
Assignee | ||
Comment 4•11 years ago
|
||
Andrew is correct, this only shows up on MacOS, where memory management is painfully slow. I was hoping to fix this by landing 988053, but that's going to take cycles I don't have at the moment. I think until I get to that it would be fine to wrap this in #ifndef XP_MACOSX.
Assignee: nobody → terrence
Status: NEW → ASSIGNED
Attachment #8404112 -
Flags: review?(jdemooij)
Flags: needinfo?(terrence)
Reporter | ||
Comment 5•11 years ago
|
||
Comment on attachment 8404112 [details] [diff] [review]
disable_shrink_on_macos-v0.diff
Review of attachment 8404112 [details] [diff] [review]:
-----------------------------------------------------------------
::: js/src/gc/Nursery.h
@@ +215,5 @@
> uintptr_t decommitStart = chunk(numActiveChunks_).start();
> JS_ASSERT(decommitStart == AlignBytes(decommitStart, 1 << 20));
> + // Bug 994054: madvise on MacOS is too slow to make this
> + // optimization worthwhile.
> +# ifndef XP_MACOSX
This will cause "unused variable: decommitStart" warnings in OS X opt builds; so move the |uintptr_t decommitStart = ..;| line also inside the #ifndef, or something similar.
Attachment #8404112 -
Flags: review?(jdemooij) → review+
Assignee | ||
Comment 6•11 years ago
|
||
Comment 7•11 years ago
|
||
Status: ASSIGNED → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla31
You need to log in
before you can comment on or make changes to this bug.
Description
•