Open
Bug 1466020
Opened 7 years ago
Updated 1 year ago
Try always yielding before sweeping in incremental collections
Categories
(Core :: JavaScript: GC, enhancement, P3)
Core
JavaScript: GC
Tracking
()
NEW
Tracking | Status | |
---|---|---|
firefox62 | --- | affected |
People
(Reporter: pbone, Unassigned)
References
(Blocks 1 open bug)
Details
Attachments
(1 file)
jonco suggested always yeilding between marking and sweeping when we're doing incremental collection. The previous behavior was to yield if we'd already yeidled once already (not-tiny collection).
Reporter | ||
Updated•7 years ago
|
Assignee: nobody → pbone
Status: NEW → ASSIGNED
Priority: -- → P3
Reporter | ||
Comment 1•7 years ago
|
||
This gives the two slice zeal modes an extra slice. I have the feeling that
this was intended all along but the "two slice" was just a bad name.
If that's the case I can add another patch to rename them.
Attachment #8982405 -
Flags: review?(jcoppeard)
Comment 2•7 years ago
|
||
Comment on attachment 8982405 [details] [diff] [review]
Bug 1466020 - Always yeild before sweeping in incremental collections
Review of attachment 8982405 [details] [diff] [review]:
-----------------------------------------------------------------
The name is correct: two slice zeal modes are only intended to have two slices. This is so that you can test what happens if we yield at a specific point in the collection.
I was thinking some more about the avoiding nursery collection change and wondered why we have to do this extra yield. As I understand it, we currently yield before sweeping if marking took more than one slice. If we haven't yielded yet then we start sweeping straight away. If this is the case, then we don't actually need to yield here to avoid nursery collection because the one we did at the start of the collection will keep us safe.
Attachment #8982405 -
Flags: review?(jcoppeard)
Reporter | ||
Comment 3•7 years ago
|
||
(In reply to Jon Coppeard (:jonco) from comment #2)
> Comment on attachment 8982405 [details] [diff] [review]
> Bug 1466020 - Always yeild before sweeping in incremental collections
>
> Review of attachment 8982405 [details] [diff] [review]:
> -----------------------------------------------------------------
>
> The name is correct: two slice zeal modes are only intended to have two
> slices. This is so that you can test what happens if we yield at a specific
> point in the collection.
Okay, I'll re-check the logic in this patch.
> I was thinking some more about the avoiding nursery collection change and
> wondered why we have to do this extra yield. As I understand it, we
> currently yield before sweeping if marking took more than one slice. If we
> haven't yielded yet then we start sweeping straight away. If this is the
> case, then we don't actually need to yield here to avoid nursery collection
> because the one we did at the start of the collection will keep us safe.
I think you're right. I'll re check the logic there also and make sure that because of this, it can remain simple.
Reporter | ||
Comment 4•7 years ago
|
||
(In reply to Paul Bone [:pbone] from comment #3)
> (In reply to Jon Coppeard (:jonco) from comment #2)
> > I was thinking some more about the avoiding nursery collection change and
> > wondered why we have to do this extra yield. As I understand it, we
> > currently yield before sweeping if marking took more than one slice. If we
> > haven't yielded yet then we start sweeping straight away. If this is the
> > case, then we don't actually need to yield here to avoid nursery collection
> > because the one we did at the start of the collection will keep us safe.
>
> I think you're right. I'll re check the logic there also and make sure that
> because of this, it can remain simple.
I have thought further about this (and checked my own notes).
If we start an incremental collection (and therefore don't collect the nursery at the beginning). Then yield part way through and the mutator allocates some things into the nusery, then continue the collection and part-way through decide to collect it non-incrementally, then the nursery not be empty and yet this condition won't fire because we're in a non-incremental mode.
Updated•4 years ago
|
Assignee: pbone → nobody
Status: ASSIGNED → NEW
Updated•3 years ago
|
Severity: normal → S3
Updated•1 year ago
|
Blocks: GC.performance
Severity: S3 → N/A
You need to log in
before you can comment on or make changes to this bug.
Description
•