Gareth Rees
b60a1636fc
Fix the mortality of the world to avoid runaway feedback between the dynamic criterion and the mortality of the arena's top generation as described in < https://info.ravenbrook.com/mail/2018/07/13/19-53-23/0/ >.
...
Copied from Perforce
Change: 194648
2018-07-13 20:56:08 +01:00
Gareth Rees
6684c5d10f
Catch-up merge from master sources at changelevel 194628.
...
Copied from Perforce
Change: 194631
2018-07-13 11:28:36 +01:00
Gareth Rees
7d956be9ce
Must get the new size of the generation before condemning it (afterwards, the condemned memory is accounted as "old", not "new").
...
Copied from Perforce
Change: 194628
2018-07-13 10:55:30 +01:00
Gareth Rees
f65c8fdfdb
Update common assertions in the manual.
...
Convert capacity to bytes once on initialization rather than every time it is used.
Copied from Perforce
Change: 194612
2018-07-11 21:27:47 +01:00
Gareth Rees
c3fd9d5ba7
Represent the set of generations condemned for a trace.
...
Eliminate duplication between policyCondemnChain and traceCondemnAll.
Compute better mortality estimate for collection of the world.
Copied from Perforce
Change: 194611
2018-07-11 21:14:43 +01:00
Gareth Rees
73734325d5
Catch-up merge from branch/2016-04-12/job004000 to branch/2016-04-13/mortality.
...
Copied from Perforce
Change: 191513
ServerID: perforce.ravenbrook.com
2016-04-21 18:20:54 +01:00
Gareth Rees
613f001ec5
Catch-up merge from master sources to branch/2016-04-12/job004000.
...
Copied from Perforce
Change: 191512
ServerID: perforce.ravenbrook.com
2016-04-21 18:03:23 +01:00
Richard Brooksby
4be15a5b0b
Catch-up merge from master sources to branch/2016-04-08/protidying.
...
Copied from Perforce
Change: 191471
ServerID: perforce.ravenbrook.com
2016-04-21 14:46:10 +01:00
Gareth Rees
8868a011a7
Catch-up merge from master sources to branch/2016-04-12/job004000.
...
Copied from Perforce
Change: 191429
ServerID: perforce.ravenbrook.com
2016-04-21 10:52:18 +01:00
Gareth Rees
c1aeb1f67a
Ensure that at most one collection of the world can be started in a call to arenapoll. this avoids a loop if the live set is large enough to provoke the "dynamic criterion".
...
Copied from Perforce
Change: 191274
ServerID: perforce.ravenbrook.com
2016-04-19 18:17:09 +01:00
Gareth Rees
7b1f72a679
Top generation mortality estimate is no longer unjustifiable: it will now converge on the correct value.
...
No need to check topGen.mortality -- this is checked by LocusCheck.
Copied from Perforce
Change: 191085
ServerID: perforce.ravenbrook.com
2016-04-13 15:52:08 +01:00
Gareth Rees
d40145c046
Maintain a moving average of the mortality of each generation.
...
Copied from Perforce
Change: 191081
ServerID: perforce.ravenbrook.com
2016-04-13 15:19:50 +01:00
Gareth Rees
749226e23a
Handle failed traceaddwhite in policycondemnchain and arenarootswalk.
...
Copied from Perforce
Change: 191040
ServerID: perforce.ravenbrook.com
2016-04-12 20:58:33 +01:00
Gareth Rees
c33b1f49e8
Condemn only the segments in the selected generations (not segments that happen to share a zone with any segment ever allocated in the generation).
...
Copied from Perforce
Change: 191034
ServerID: perforce.ravenbrook.com
2016-04-12 19:42:03 +01:00
Richard Brooksby
cf29dcc98d
Making arenas properly inherit from instances, and converting remaining method calls to use the method macro, while noting uses which are inside-out.
...
Copied from Perforce
Change: 190856
ServerID: perforce.ravenbrook.com
2016-04-10 14:00:55 +01:00
Richard Brooksby
d4a055f70b
Merging branch/2016-03-12/pause into the master sources.
...
Copied from Perforce
Change: 190053
ServerID: perforce.ravenbrook.com
2016-03-15 06:31:08 +00:00
Richard Brooksby
78aa13019d
Don't return to the mutator if there's an emergency.
...
Clarifying "more time" and what we do if there's isn't.
Copied from Perforce
Change: 190050
ServerID: perforce.ravenbrook.com
2016-03-15 06:25:53 +00:00
Gareth Rees
e034e7aeea
Address points made by rb in review < https://info.ravenbrook.com/mail/2016/03/14/18-48-19/0/ >
...
Copied from Perforce
Change: 190031
ServerID: perforce.ravenbrook.com
2016-03-14 20:10:14 +00:00
Gareth Rees
d08cfa1892
Don't forget to multiply by clockspersec!
...
Copied from Perforce
Change: 189927
ServerID: perforce.ravenbrook.com
2016-03-12 22:56:52 +00:00
Gareth Rees
167408b7e0
Implement pause time control.
...
Copied from Perforce
Change: 189921
ServerID: perforce.ravenbrook.com
2016-03-12 22:08:26 +00:00
Richard Brooksby
275770ed43
Catch-up merge from master sources to branch/2015-08-25/tradeoff.
...
Copied from Perforce
Change: 189891
ServerID: perforce.ravenbrook.com
2016-03-12 15:13:15 +00:00
Gareth Rees
973f5369e1
Rename chain.h to locus.h, for consistency with other modules, where the interface has the same name as the implemention.
...
Copied from Perforce
Change: 189682
ServerID: perforce.ravenbrook.com
2016-03-06 18:56:32 +00:00
Richard Brooksby
a509df4c2b
Fix typo found by gdr.
...
Copied from Perforce
Change: 189376
ServerID: perforce.ravenbrook.com
2016-02-28 20:12:12 +00:00
Richard Brooksby
13eab92d00
Try later allocation plans if growing the arena fails.
...
Copied from Perforce
Change: 189363
ServerID: perforce.ravenbrook.com
2016-02-26 19:59:55 +00:00
Richard Brooksby
ef17ba047b
Purge spare committed memory when growing the arena fails due to the commit limit.
...
Copied from Perforce
Change: 189362
ServerID: perforce.ravenbrook.com
2016-02-26 19:59:55 +00:00
Richard Brooksby
12f778bf11
Catch-up merge from branch/2015-08-11/policy.
...
Copied from Perforce
Change: 189339
ServerID: perforce.ravenbrook.com
2016-02-25 23:08:49 +00:00
Nick Barnes
75aab3b943
Remove redundant assignment.
...
Copied from Perforce
Change: 188292
ServerID: perforce.ravenbrook.com
2015-09-09 15:20:01 +01:00
Gareth Rees
2435b9949a
Can't assume that the caller will give us any available time.
...
Copied from Perforce
Change: 188259
ServerID: perforce.ravenbrook.com
2015-09-04 22:35:03 +01:00
Gareth Rees
3ef063c80f
Avoid "iso c90 forbids mixed declarations and code" error from gcc.
...
Copied from Perforce
Change: 188257
ServerID: perforce.ravenbrook.com
2015-09-04 22:28:40 +01:00
Gareth Rees
aa6a027c68
Catch-up merge from branch/2015-08-11/policy to branch/2015-08-25/tradeoff.
...
Copied from Perforce
Change: 188250
ServerID: perforce.ravenbrook.com
2015-09-04 19:13:28 +01:00
Gareth Rees
0a927608dc
Policycollectiontime is now local to policy.c.
...
Improve comment for policyCondemnChain (document the mortalityReturn parameter to; fix design reference).
Copied from Perforce
Change: 188240
ServerID: perforce.ravenbrook.com
2015-09-04 16:02:46 +01:00
Gareth Rees
2514663693
Move policy for mps_arena_step to policy module.
...
Copied from Perforce
Change: 188238
ServerID: perforce.ravenbrook.com
2015-09-04 15:25:37 +01:00
Gareth Rees
7bf1664f5e
Separate the values "more work to do?" and "amount of work done" in tracepoll. previously, the code used "amount of work done > 0" when it needed "more work to do?" but that's not right, because on the last two calls to traceadvance, no "work" is done (because reclaim work is not measured), but there may still be more work to do.
...
Copied from Perforce
Change: 188218
ServerID: perforce.ravenbrook.com
2015-09-03 15:51:37 +01:00
Gareth Rees
851e35bcff
Move the arenaemergency test up to policypollagain.
...
Copied from Perforce
Change: 188217
ServerID: perforce.ravenbrook.com
2015-09-03 15:39:39 +01:00
Gareth Rees
ef62affc6d
Move the clearing of the emergency flag down into tracedestroy{init,finish}.
...
Copied from Perforce
Change: 188216
ServerID: perforce.ravenbrook.com
2015-09-03 15:35:38 +01:00
Gareth Rees
b4db3bd09f
Introduce new type work representing a measure of work done by the collector. use this systematically to make the code clearer.
...
Copied from Perforce
Change: 188210
ServerID: perforce.ravenbrook.com
2015-09-03 13:01:55 +01:00
Gareth Rees
3b0e0c2aa5
Don't start a trace unless there's work to do.
...
Copied from Perforce
Change: 188204
ServerID: perforce.ravenbrook.com
2015-09-02 21:55:24 +01:00
Gareth Rees
b0e9c66094
Use sizeisarenagrains macro.
...
Copied from Perforce
Change: 188172
ServerID: perforce.ravenbrook.com
2015-08-25 15:03:35 +01:00
Gareth Rees
517ffb9344
Condition >= 1.0 is needed to ensure division can't overflow.
...
Copied from Perforce
Change: 188170
ServerID: perforce.ravenbrook.com
2015-08-25 13:50:19 +01:00
Gareth Rees
9dd49aa48e
New functions policypoll and policypollagain.
...
Update design.strategy.
Copied from Perforce
Change: 188165
ServerID: perforce.ravenbrook.com
2015-08-25 13:27:17 +01:00
Gareth Rees
d506458eea
New function policycollectiontime estimates the time needed to collect the arena. mysterious constants are given names and moved to config.h.
...
Copied from Perforce
Change: 188160
ServerID: perforce.ravenbrook.com
2015-08-21 15:27:14 +01:00
Gareth Rees
b41d6be0e4
New function policycondemnchain.
...
Copied from Perforce
Change: 188156
ServerID: perforce.ravenbrook.com
2015-08-21 11:01:00 +01:00
Gareth Rees
eee7ccb60c
New function policystarttrace decides whether to start a trace.
...
Copied from Perforce
Change: 188154
ServerID: perforce.ravenbrook.com
2015-08-20 16:57:33 +01:00
Gareth Rees
b3056139c8
New module policy.c.
...
Copied from Perforce
Change: 188152
ServerID: perforce.ravenbrook.com
2015-08-19 15:03:47 +01:00