Bug 85936

Summary: Heap should not continually allocate new pages in steady state
Product: WebKit Reporter: Mark Hahnenberg <mhahnenberg>
Component: JavaScriptCoreAssignee: Mark Hahnenberg <mhahnenberg>
Severity: Normal CC: ggaren
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: Unspecified   
OS: Unspecified   
Description Flags
Patch none

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