Bug 85936 - Heap should not continually allocate new pages in steady state
Summary: Heap should not continually allocate new pages in steady state
Alias: None
Product: WebKit
Classification: Unclassified
Component: JavaScriptCore (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Mark Hahnenberg
Depends on:
Reported: 2012-05-08 17:53 PDT by Mark Hahnenberg
Modified: 2012-05-08 19:44 PDT (History)
1 user (show)

See Also:

Patch (5.78 KB, patch)
2012-05-08 18:20 PDT, Mark Hahnenberg
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Mark Hahnenberg 2012-05-08 17:53:14 PDT
Currently, in steady state (i.e. a constant amount of live GC memory with a constant rate of allocation) assuming we've just finished a collection with X live blocks in CopiedSpace, we increase our working set by X blocks in CopiedSpace with each collection we perform. This is due to the fact that we allocate until we run out of free blocks to use in the Heap before we consider whether we should run a collection. 

In the longer term, this issue will be mostly resolved by implementing quick release for the CopiedSpace. In the shorter term, we should change our policy to check whether we should allocate before trying to use a free block from the Heap. We can change our policy to something more appropriate once we have implemented quick release.

This change should also have the convenient side effect of reducing the variance in GC-heavy tests (e.g. v8-splay) due to fact that we are doing less VM allocation during copying collection.
Comment 1 Mark Hahnenberg 2012-05-08 18:20:13 PDT
Created attachment 140837 [details]
Comment 2 Mark Hahnenberg 2012-05-08 18:21:01 PDT
Comment on attachment 140837 [details]

This patch was already r+ed by Geoff Garen (ggaren).
Comment 3 Mark Hahnenberg 2012-05-08 19:44:18 PDT
Landed in http://trac.webkit.org/changeset/116484