1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2026-01-04 11:00:45 -08:00

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
This commit is contained in:
Richard Kistruck 2007-02-08 17:29:53 +00:00
parent 669aa9d602
commit 0daeea0f54
2 changed files with 10 additions and 79 deletions

View file

@ -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.

View file

@ -271,6 +271,14 @@
<p>[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.]</p>
<h2>Other notes</h2>
<p>For an earlier brief analysis of how a collection starts, see
<a href="http://info.ravenbrook.com/project/mps/branch/2003-02-17/gcgenmsg/design/collection-incept/index.txt">design/collection-incept</a>
<sup><a href="../../manual/wiki/index.html#not-publicly-available" title="this document is not publicly available">&empty;</a></sup>
in the gcgenmsg branch.</p>
<h2><a id="section-B" name="section-B">B. Document History</a></h2>
@ -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.
</pre>
<h2><a id="section-C" name="section-C">C. Copyright and License</a></h2>
<p> This document is copyright &copy; 2006 <a href="http://www.ravenbrook.com/">Ravenbrook Limited</a>. All rights reserved. This is an open source license. Contact Ravenbrook for commercial licensing options. </p>
<p> This document is copyright &copy; 2006-2007 <a href="http://www.ravenbrook.com/">Ravenbrook Limited</a>. All rights reserved. This is an open source license. Contact Ravenbrook for commercial licensing options. </p>
<p> Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: </p>