Closed
Bug 988053
Opened 11 years ago
Closed 11 years ago
Commit nursery allocation as we go
Categories
(Core :: JavaScript: GC, defect)
Core
JavaScript: GC
Tracking
()
RESOLVED
WONTFIX
People
(Reporter: terrence, Assigned: terrence)
References
Details
Attachments
(1 file, 4 obsolete files)
(deleted),
patch
|
terrence
:
review+
|
Details | Diff | Splinter Review |
Should dramatically reduce the memory spike on M-oth.
Attachment #8396771 -
Flags: review?(jcoppeard)
Comment 1•11 years ago
|
||
Comment on attachment 8396771 [details] [diff] [review]
start_memory_uncommitted-v0.diff
Review of attachment 8396771 [details] [diff] [review]:
-----------------------------------------------------------------
::: js/src/gc/Memory.cpp
@@ +78,5 @@
> +void *
> +gc::RetainAlignedAddressRange(JSRuntime *rt, size_t size, size_t alignment)
> +{
> + int type = MEM_RESERVE;
> + VirtualAllocAligned(rt, size, alignment, );
Seems like this won't compile - did you forget to qref?
::: js/src/gc/Memory.h
@@ +20,5 @@
> InitMemorySubsystem(JSRuntime *rt);
>
> +// Add a mapping for an aligned address range, but do not commit the memory.
> +void *
> +RetainAlignedAddressRange(JSRuntime *rt, size_t size, size_t alignment);
I'm not sure about the name "retain". To me this sounds like the address range was already present somehow. Maybe we could just go with AllocateAlignedAddressRange?
Attachment #8396771 -
Flags: review?(jcoppeard)
Assignee | ||
Comment 2•11 years ago
|
||
No, even dumber: I copied after roughing out the idea and not after fixing the bugs in the linux impl.
Attachment #8396771 -
Attachment is obsolete: true
Attachment #8397062 -
Flags: review?(jcoppeard)
Comment 3•11 years ago
|
||
Comment on attachment 8397062 [details] [diff] [review]
start_memory_uncommitted-v1.diff
Review of attachment 8397062 [details] [diff] [review]:
-----------------------------------------------------------------
Looks good!
::: js/src/gc/Nursery.h
@@ +207,5 @@
> + // Ensure our usable range is committed.
> + if (numActiveChunks_ > 0) {
> + bool result = gc::CommitAddressRange((void *)start(), gc::ChunkSize * nchunks);
> + if (!result)
> + return false;
If we put off setting numActiveChunks_ until after this point, I think we can avoid crashing if this fails when we are trying to grow. We just won't grow the nursery and will continue with the previous size.
Attachment #8397062 -
Flags: review?(jcoppeard) → review+
Assignee | ||
Comment 4•11 years ago
|
||
Rebased and applied review comments.
Attachment #8397062 -
Attachment is obsolete: true
Attachment #8397302 -
Flags: review+
Assignee | ||
Comment 5•11 years ago
|
||
I removed JS_GC_ZEAL from around POISON, so the poison patterns need to be moved under JS_CRASH_DIAGNOSTICS.
Attachment #8397302 -
Attachment is obsolete: true
Attachment #8397327 -
Flags: review+
Assignee | ||
Comment 6•11 years ago
|
||
Moving the assignment down means we don't have the right value yet.
Attachment #8397327 -
Attachment is obsolete: true
Attachment #8397362 -
Flags: review+
Assignee | ||
Updated•11 years ago
|
Keywords: checkin-needed
Comment 7•11 years ago
|
||
Keywords: checkin-needed
Comment 8•11 years ago
|
||
Hi terrence, sorry had to backout this change for bustage like https://tbpl.mozilla.org/php/getParsedLog.php?id=36861808&tree=Mozilla-Inbound
Assignee | ||
Comment 9•11 years ago
|
||
The M-oth spike was unrelated -- our existing decommit logic works well enough on all platforms to effectively reduce RSS by the amount we save from GGC: 10-15% across the board. Given that RSS is already down, it's not clear that this actually does anything other than complexify the logic.
Status: ASSIGNED → RESOLVED
Closed: 11 years ago
Resolution: --- → WONTFIX
You need to log in
before you can comment on or make changes to this bug.
Description
•