Gareth Rees
5969ae2114
Catch-up merge from branch/2014-04-15/mvffnoseg @186485 to branch/2014-05-15/size.
...
Copied from Perforce
Change: 186487
ServerID: perforce.ravenbrook.com
2014-06-11 13:17:14 +01:00
Gareth Rees
a08139899f
Catch-up merge from master sources @186481 to branch/2014-04-15/mvffnoseg.
...
Copied from Perforce
Change: 186484
ServerID: perforce.ravenbrook.com
2014-06-11 12:42:58 +01:00
Gareth Rees
0b5dbed673
Catch-up merge from master sources @186460 to branch/2014-04-08/align.
...
Copied from Perforce
Change: 186461
ServerID: perforce.ravenbrook.com
2014-06-09 19:26:31 +01:00
Gareth Rees
8eb003846d
Fix problems identified by rb in review < https://info.ravenbrook.com/mail/2014/06/04/15-13-24/0/ >.
...
Copied from Perforce
Change: 186449
ServerID: perforce.ravenbrook.com
2014-06-08 20:28:33 +01:00
Gareth Rees
d04cd204c3
Add comments addressing points noted by dl in review < https://info.ravenbrook.com/mail/2014/06/04/14-08-35/0/ >.
...
Copied from Perforce
Change: 186448
ServerID: perforce.ravenbrook.com
2014-06-08 20:08:38 +01:00
Gareth Rees
3f98a87c2e
Remove unused pool class attributes.
...
Bring method descriptions up to date in pool class design.
Copied from Perforce
Change: 186446
ServerID: perforce.ravenbrook.com
2014-06-08 19:54:24 +01:00
Gareth Rees
317cad785d
Catch-up merge from master sources @186436 to branch/2014-04-08/align.
...
Copied from Perforce
Change: 186439
ServerID: perforce.ravenbrook.com
2014-06-08 16:30:53 +01:00
Richard Brooksby
f01866c7f0
Fixing wrong function name in comment.
...
Copied from Perforce
Change: 186418
ServerID: perforce.ravenbrook.com
2014-06-05 13:14:37 +01:00
Gareth Rees
254d116f09
Landvisitor no longer takes a deletereturn.
...
Copied from Perforce
Change: 186366
ServerID: perforce.ravenbrook.com
2014-05-30 12:13:40 +01:00
Gareth Rees
8e4721db4c
Fix problems identified by rb in review < https://info.ravenbrook.com/mail/2014/05/29/13-01-02/0/ >.
...
Copied from Perforce
Change: 186347
ServerID: perforce.ravenbrook.com
2014-05-29 14:50:36 +01:00
Gareth Rees
981a266642
New public functions mps_pool_total_size and mps_pool_free_size.
...
Old (undocumented) functions mps_{mv,mvff,mvt}_size and mps_{mv,mvff,mvt}_free_size are now macros for the new public functions.
New pool methods PoolTotalSize and PoolFreeSize, with implementations for public pool classes except SNC.
Coverage of the new functions in apss and mpmss for the manual pool classes, and in finaltest for the automatic pool classes.
Copied from Perforce
Change: 186118
ServerID: perforce.ravenbrook.com
2014-05-15 17:01:59 +01:00
Gareth Rees
cf427ca23c
Merge branch/2014-04-08/align into branch/2014-05-15/size.
...
Copied from Perforce
Change: 186116
ServerID: perforce.ravenbrook.com
2014-05-15 14:54:36 +01:00
Gareth Rees
6980f345f1
Add note about potential for speed improvement, as requested by rb.
...
Copied from Perforce
Change: 186093
ServerID: perforce.ravenbrook.com
2014-05-13 18:04:59 +01:00
Gareth Rees
9b98c26ff3
Describe the block pool.
...
Copied from Perforce
Change: 186091
ServerID: perforce.ravenbrook.com
2014-05-13 17:49:35 +01:00
Gareth Rees
7cd4759316
Catch-up merge from branch/2014-03-30/addrset to branch/2014-04-15/mvffnoseg.
...
Copied from Perforce
Change: 186082
ServerID: perforce.ravenbrook.com
2014-05-13 16:27:17 +01:00
Gareth Rees
34cc9d49e4
Catch-up merge from master sources @186077 to branch/2014-03-30/addrset.
...
Copied from Perforce
Change: 186081
ServerID: perforce.ravenbrook.com
2014-05-13 16:21:39 +01:00
Gareth Rees
f4a4f1e250
Merge branch/2014-02-23/mvff-tune into branch/2014-04-15/mvffnoseg.
...
Copied from Perforce
Change: 186079
ServerID: perforce.ravenbrook.com
2014-05-13 16:10:51 +01:00
Gareth Rees
7620c6fcd1
Fix rash build on os x by adding the unused attribute to functions declared static that are not called in the rash variety.
...
Copied from Perforce
Change: 185915
ServerID: perforce.ravenbrook.com
2014-05-01 12:18:00 +01:00
David Lovemore
70c0cb9a94
Rename bool(v) to boolof(v) to fix clash with the windows header file windows.h
...
Copied from Perforce
Change: 185841
ServerID: perforce.ravenbrook.com
2014-04-28 13:14:04 +01:00
Gareth Rees
4b49fc7d57
Mvff no longer uses segments, but instead maintains the address ranges it has acquired from the arena in a cbs.
...
Copied from Perforce
Change: 185574
ServerID: perforce.ravenbrook.com
2014-04-15 17:52:14 +01:00
Gareth Rees
87b3880405
New generic function landsize returns the total size of ranges in a land (if the land supports it). implement it for all land classes.
...
The MVFF pool class doesn't have to maintain its free size any more: it can just call LandSize.
Move re-entrancy protection from CBS to Land. This allows us to remove some CBS functions. (But requires some adjustment in failoverDelete.)
In MVFF, do more checking of mvff->total.
Copied from Perforce
Change: 185569
ServerID: perforce.ravenbrook.com
2014-04-15 16:35:34 +01:00
Gareth Rees
4deafee125
Lands maintain the total size of the address ranges they maintain. (this avoids the need to do free size accounting in mvff.)
...
Copied from Perforce
Change: 185567
ServerID: perforce.ravenbrook.com
2014-04-15 14:23:53 +01:00
Gareth Rees
42f18f93af
Catch-up merge from master/...@185556 to branch/2014-03-30/addrset.
...
Copied from Perforce
Change: 185563
ServerID: perforce.ravenbrook.com
2014-04-15 13:14:50 +01:00
Gareth Rees
93a79ac8a6
Add -wconversion to the options for gcc. ensure that the mps builds.
...
Copied from Perforce
Change: 185463
ServerID: perforce.ravenbrook.com
2014-04-11 14:25:15 +01:00
Gareth Rees
2e053caffc
Alas, mvff and mvt can't round up alignment because they need to support buffered allocation.
...
Copied from Perforce
Change: 185381
ServerID: perforce.ravenbrook.com
2014-04-09 13:01:58 +01:00
Gareth Rees
4c9426514c
Alignment is now configurable for mv pools using mps_key_align.
...
MVFF and MVT support alignments down to FreelistMinimumAlignment.
For MVFF and MVT, alignments that are too small are rounded up automatically, to make it easier to write portable programs.
Copied from Perforce
Change: 185369
ServerID: perforce.ravenbrook.com
2014-04-08 21:32:19 +01:00
Gareth Rees
262bb324f3
No keyword arguments needed in these cbsfastlandclass initializations.
...
Copied from Perforce
Change: 185329
ServerID: perforce.ravenbrook.com
2014-04-08 00:13:50 +01:00
Gareth Rees
b90f8b9bcd
Use cbs subclasses to implement the fast-find and find-in-zones features. this avoids the need to control behaviour by passing booleans, and it means that there is no wasted space in the cbs block structure when these features are not used.
...
Bring splay tree design up to date; add missing diagrams; move it to the "current" section of the manual.
Copied from Perforce
Change: 185294
ServerID: perforce.ravenbrook.com
2014-04-07 15:36:18 +01:00
Gareth Rees
4b5d396792
Catch-up merge from master sources to branch/2014-03-30/addrset.
...
Copied from Perforce
Change: 185288
ServerID: perforce.ravenbrook.com
2014-04-07 15:02:09 +01:00
Gareth Rees
d3d2795fce
Improve control over checking:
...
1. Where Type is a pointer type with a signature, replace CHECKL(TypeCheck(val)) with CHECKD(Type, val).
2. Where Type is a pointer type with no signature, replace CHECKL(TypeCheck(val)) with CHECKD_NOSIG(Type, val).
3. Where Type is a pointer type with a signature, but the structure is not visible at point of checking, replace CHECKL(TypeCheck(val)) with CHECKD_NOSIG(Type, val). Reference <design/check/#.hidden-type>
4. Make BTCheck extern and use it where possible.
5. Replace AVER(TypeCheck(val)) with AVERT(Type, val).
Copied from Perforce
Change: 185263
ServerID: perforce.ravenbrook.com
2014-04-06 22:51:05 +01:00
Gareth Rees
673eea41a0
Check classes after defining them.
...
Copied from Perforce
Change: 185228
ServerID: perforce.ravenbrook.com
2014-04-04 12:51:07 +01:00
Gareth Rees
86a50c3d1c
Fix file-at-a-time compilation.
...
Copied from Perforce
Change: 185210
ServerID: perforce.ravenbrook.com
2014-04-03 15:01:53 +01:00
Gareth Rees
ce6b34aa8f
Test the failover module (both always and never failing over).
...
Fix result code bug in failoverInsert.
Test all result codes in fotest.
Tidy up code and documentation.
Copied from Perforce
Change: 185207
ServerID: perforce.ravenbrook.com
2014-04-03 14:46:58 +01:00
Gareth Rees
0b159dc650
New module failover implements a fail-over allocator as a land class.
...
Use Failover in MVT and MVFF.
Test Failover in landtest.
Implementation of LandFindInZones for Freelist (untested).
Remove signature from RangeStruct so we can embed it without a space cost.
Copied from Perforce
Change: 185196
ServerID: perforce.ravenbrook.com
2014-04-03 12:52:23 +01:00
Gareth Rees
b409ae89f6
Turn freelist into a land class.
...
Copied from Perforce
Change: 185155
ServerID: perforce.ravenbrook.com
2014-04-02 14:01:18 +01:00
Gareth Rees
5314260bc8
Avoid type puns.
...
Copied from Perforce
Change: 185151
ServerID: perforce.ravenbrook.com
2014-04-02 12:16:38 +01:00
Gareth Rees
1d8238419a
Landiargs -> liargs for terseness and consistency.
...
Copied from Perforce
Change: 185147
ServerID: perforce.ravenbrook.com
2014-04-01 23:39:03 +01:00
Gareth Rees
d2cbfda452
First pass at implementation of lands (collections of address ranges). 100% boilerplate!
...
Copied from Perforce
Change: 185131
ServerID: perforce.ravenbrook.com
2014-04-01 19:51:55 +01:00
Richard Brooksby
887c6e3845
Tidying up interfaces to cbsinit and cbsfindinzones.
...
Documenting assumptions about CBS block allocation used by the arena.
Copied from Perforce
Change: 184593
ServerID: perforce.ravenbrook.com
2014-02-28 10:30:32 +00:00
Richard Brooksby
ddfec2c708
Eliminating complex zonedcbs adt and reintroducing a cbs with zone summaries. removing the default “high” segment preference, that caused the cbs trees to unbalance, and isn’t required outside of ep. considerable reduction in code and speed up, now at parity with master on test xc/release/gcbench -x 1234 amc
...
Copied from Perforce
Change: 184587
ServerID: perforce.ravenbrook.com
2014-02-28 00:35:05 +00:00
Richard Brooksby
f31fc5325a
Instead of aggressively returning every page it can, mvff takes a parameter for the proportion of spare space to hold in its free lists before attempting to return space to the arena.
...
Copied from Perforce
Change: 184498
ServerID: perforce.ravenbrook.com
2014-02-24 23:04:31 +00:00
Richard Brooksby
57c9c5aac8
Finishing the mvff block pool. oops.
...
Copied from Perforce
Change: 184487
ServerID: perforce.ravenbrook.com
2014-02-24 21:14:40 +00:00
Richard Brooksby
5fc0d82d6a
Initialising a shared inline mfs for the cbss in mvff so that mvff can be used as the arena’s bootstrap and control pool.
...
Copied from Perforce
Change: 184486
ServerID: perforce.ravenbrook.com
2014-02-24 21:14:40 +00:00
Richard Brooksby
05a2713826
Reforming mvff pool class to avoid using segments and to actually have a chance to return memory to the arena.
...
Copied from Perforce
Change: 184467
ServerID: perforce.ravenbrook.com
2014-02-23 21:00:53 +00:00
Richard Brooksby
7a73e98638
Refactored implementation of preferenced allocation policy from vm arena to general purpose arena.
...
Eliminating SegPrefExpress in most places, especially where there wasn’t really any preference.
Eliminating special case knowledge about garbage collection from the arena.
Copied from Perforce
Change: 184279
ServerID: perforce.ravenbrook.com
2014-01-30 18:08:10 +00:00
Richard Brooksby
8e4e0f066e
Eliminating dodgy use of *segprefdefault() which could lead to implicit calls to memcpy.
...
Copied from Perforce
Change: 184217
ServerID: perforce.ravenbrook.com
2014-01-29 15:13:22 +00:00
Richard Brooksby
56d48bbd1d
iterating over segments using the pool and segment rings, rather than scanning the tract table, which may be full of irrelevant tracts, especially when non-gc pools are large. see < https://info.ravenbrook.com/mail/2014/01/25/12-16-09/0/ >.
...
Copied from Perforce
Change: 184120
ServerID: perforce.ravenbrook.com
2014-01-25 15:33:10 +00:00
Gareth Rees
da3afade7b
Mvt takes configurable alignment via a keyword argument.
...
Copied from Perforce
Change: 182605
ServerID: perforce.ravenbrook.com
2013-06-07 14:45:14 +01:00
Gareth Rees
938f1945fa
Encapsulate cbsfindlargest falling back to freelistfindlargest as suggested by rb in review.
...
Copied from Perforce
Change: 182502
ServerID: perforce.ravenbrook.com
2013-06-04 17:10:38 +01:00
Gareth Rees
2bda69bc6b
New test case "fotest" for fail-over of cbs to freelist in mvff. (plus stub for mvt.) need some testing hooks in mvff and mvt for getting the cbs.
...
This reveals a couple of bugs in MVFF: (i) if CBSDelete fails, this might be because the block is actually on the Freelist instead; (ii) we can't SegFree before calling FreelistDelete because the Freelist needs access to the memory in order to read its pointers.
Copied from Perforce
Change: 182500
ServerID: perforce.ravenbrook.com
2013-06-04 16:51:24 +01:00