From 0daeea0f54f76b8dfe6aa6754c343d4bc41e4384 Mon Sep 17 00:00:00 2001 From: Richard Kistruck Date: Thu, 8 Feb 2007 17:29:53 +0000 Subject: [PATCH] Mps design/collection-incept is not really design, and is superseded by wiki article gc story, so delete it and ref it from the wiki article. Copied from Perforce Change: 161712 ServerID: perforce.ravenbrook.com --- mps/design/collection-incept/index.txt | 78 -------------------------- mps/manual/wiki/gc_story.html | 11 +++- 2 files changed, 10 insertions(+), 79 deletions(-) delete mode 100644 mps/design/collection-incept/index.txt diff --git a/mps/design/collection-incept/index.txt b/mps/design/collection-incept/index.txt deleted file mode 100644 index aa862d786d9..00000000000 --- a/mps/design/collection-incept/index.txt +++ /dev/null @@ -1,78 +0,0 @@ -2003-02-11T13:45Z -drj@ravenbrook.com - -Collection Inception or How and Why Collections Start - -Summary - -There are three ways a collection can start: - -* Some nursery generation is full (See .collect.incept.chain below). - -* "Dynamic Criterion" See .collect.incept.dynamic below. Perhaps this -is better named: global memory exhaustion. - -* opportunistic, via arenaShouldCollectWorld. - - -Implementation Details - - -Various MPS interface functions call ArenaPoll. ArenaPoll will -occasionally call ArenaStep (specifically, if the mutator has allocated -more than globals->pollThreshold). - -mps_arena_step is a direct interface to ArenaStep. - -ArenaStep will call ArenaStartCollect to start a collection if -arenaShouldCollectWorld returns true. But ordinarily it will call -TracePoll. - -arenaShouldCollectWorld will return true if it has been given enough -time and it has been a while (specifically 10 * its time estimate) since -the last world collection) (and there isn't a collection in progress). - -ArenaStartCollect calls traceStartCollectAll - -TracePoll contains the meat of the policy. Big and hairy. See -strategy.lisp-machine! - -What is tTracePerScan, well t probably denotes time. -So it denotes (an estimate of) the time taken to perform the collection -in units of cScan (the cost of scanning a unit. byte?). -TraceCopyScanRATIO is how much more expensive a copy is than a scan -(currently 1.5). - -.collect.incept.dynamic: TracePoll uses a so called "dynamic" (poor Lisp -Machine terminology) strategy to decide whether to collect everything (via -traceStartCollectAll). - -.collect.incept.chain: -Otherwise it maps over all Chains (arena->chainRing) and calls -ChainDeferral(chain) and gets the minimum answer over all chains. The -chain with the minimum answer (which is negative) gets ChainCondemnAuto -called on it, then ChainStartGC. - -ChainCondemnAuto picks a set of gens, generates a ZoneSet covering -those, and then condemns everything in those zones using -TraceCondemnZones. - -.chain.condemn.promote: It strikes me that -when we do this we ought to not promote anything that is condemned -"incidentally" (that is condemned because it is in a relevant zone, but -not in a generation whose time is up). - -In the (common) case where TracePoll decides to not start a collection -then it progresses the only trace by a single quantum. - -=== AMC's chains === - -Generation are created by calls to amcGenCreate from amcInitComm. -There is a chain, amc->chain. Which is one of the va_args to creation. -Creates count+1 generations where count = ChainGens(). Eseentially one -gen is created for each gen in the chain and attached to the chain's -generation locus. An additional gen is created ("topgen") and associated -with the arena's locus of top generations. (See hack in PoolGenInit) - -Serial number of a PoolGen (->nr field) is unique within that pool's -generations. diff --git a/mps/manual/wiki/gc_story.html b/mps/manual/wiki/gc_story.html index 3c43012cf47..28471f0d307 100644 --- a/mps/manual/wiki/gc_story.html +++ b/mps/manual/wiki/gc_story.html @@ -271,6 +271,14 @@

[Future: Indeed, in some sense, reclaim can only happen at the end of collection. A large collection C could be subdivided into smaller collections C1 and C2, and perhaps C1 might finish earlier. But choosing how to subdivide is a combinatorial problem, unless the mutator can give us a clue.]

+ +

Other notes

+ +

For an earlier brief analysis of how a collection starts, see + design/collection-incept + + in the gcgenmsg branch.

+

B. Document History

@@ -283,12 +291,13 @@ 2006-12-06 RHSK Purpose. Generation can mean 3 things. 2006-12-06 RHSK Notes on problem areas. Reclaim. Simplify diagram. 2006-12-07 RHSK What does generation really mean? + 2007-02-08 RHSK Link to old design/collection-incept.

C. Copyright and License

-

This document is copyright © 2006 Ravenbrook Limited. All rights reserved. This is an open source license. Contact Ravenbrook for commercial licensing options.

+

This document is copyright © 2006-2007 Ravenbrook Limited. All rights reserved. This is an open source license. Contact Ravenbrook for commercial licensing options.

Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: