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
3704522c58
Catch-up merge from master sources @186352 to branch/2014-04-15/mvffnoseg.
...
Copied from Perforce
Change: 186355
ServerID: perforce.ravenbrook.com
2014-05-29 16:03:34 +01:00
Gareth Rees
51e39dc087
Pass and check special closure values unused_pointer, unused_size instead of null, 0.
...
Copied from Perforce
Change: 186352
ServerID: perforce.ravenbrook.com
2014-05-29 15:28:33 +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
fd57486106
Fix problems identified by dl in review < https://info.ravenbrook.com/mail/2014/05/23/12-44-54/0/ >.
...
Copied from Perforce
Change: 186300
ServerID: perforce.ravenbrook.com
2014-05-25 20:49:22 +01:00
Gareth Rees
181767e4db
Split land iteration into two functions, one which deletes ranges, the other which does not.
...
Copied from Perforce
Change: 186298
ServerID: perforce.ravenbrook.com
2014-05-25 19:26:48 +01:00
Gareth Rees
bb21449097
Landiterate now returns a bool indicating whether all visitor calls returned true.
...
Copied from Perforce
Change: 186165
ServerID: perforce.ravenbrook.com
2014-05-18 22:46:16 +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
8e72725b5b
Assert that size > 0 in cbsfindlargest. (merged from change 184496.)
...
Copied from Perforce
Change: 186075
ServerID: perforce.ravenbrook.com
2014-05-13 13:44:42 +01:00
Gareth Rees
7985175687
Fixed a bug in cbsfindlargest where it always deleted the entire range found even when finddeletelow or finddeletehigh were passed. (merged from change 184493.)
...
Copied from Perforce
Change: 186074
ServerID: perforce.ravenbrook.com
2014-05-13 13:33:46 +01:00
Gareth Rees
58b2d71836
Bug fix. ensuring cbsfinddeleterange returns oldrangereturn even if it doesn’t delete a block. (merged from change 184485.)
...
Copied from Perforce
Change: 186070
ServerID: perforce.ravenbrook.com
2014-05-13 12:30:23 +01:00
Gareth Rees
3a1ce9493f
Remove mps_key_cbs_extend_by and mfsextendself keyword arguments to cbsinit. these were unused and obsoleted by cbsblockpool.
...
Copied from Perforce
Change: 186006
ServerID: perforce.ravenbrook.com
2014-05-11 19:09:44 +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
Gareth Rees
29035a7f67
Put cbsfindinzones back where it was (moving it broke the build).
...
Copied from Perforce
Change: 185584
ServerID: perforce.ravenbrook.com
2014-04-16 11:19:55 +01:00
Gareth Rees
b3a3b0b8fc
Move cbsfindinzones so that diff is cleaner.
...
Copied from Perforce
Change: 185578
ServerID: perforce.ravenbrook.com
2014-04-16 10:24:26 +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
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
9c8713f51b
Fix problems found by coverity. see < https://info.ravenbrook.com/mail/2014/04/10/23-23-42/0/ > for full analysis.
...
Copied from Perforce
Change: 185445
ServerID: perforce.ravenbrook.com
2014-04-11 00:26:48 +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
f2776dc0b4
Can't use checkd_nosig(tree, ...) because treeempty is null.
...
arena->enabledMessageTypes might be NULL.
Copied from Perforce
Change: 185271
ServerID: perforce.ravenbrook.com
2014-04-07 10:14:40 +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
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
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
687c50b762
Implementing top-down (last fit) allocation in zones.
...
Copied from Perforce
Change: 184771
ServerID: perforce.ravenbrook.com
2014-03-13 12:06:28 +00:00
Richard Brooksby
2ce13f82dc
Incomplete response to code review. see < https://info.ravenbrook.com/mail/2014/03/07/11-21-03/0/ >.
...
Copied from Perforce
Change: 184735
ServerID: perforce.ravenbrook.com
2014-03-11 16:39:11 +00:00
Richard Brooksby
2b9719e4bd
Catch-up merge from master.
...
Copied from Perforce
Change: 184732
ServerID: perforce.ravenbrook.com
2014-03-11 16:30:47 +00:00
Richard Brooksby
1e8eec530b
Catch-up merge from branch/2014-02-22/splay-tune to pick up code review changes.
...
Copied from Perforce
Change: 184727
ServerID: perforce.ravenbrook.com
2014-03-11 16:07:19 +00:00
Richard Brooksby
16e0798806
Responding to code review < https://info.ravenbrook.com/mail/2014/03/07/22-40-36/0/ >.
...
Using TREE_ELT where appropriate.
Using AVERT consistently on Tree, but see job003691.
Copied from Perforce
Change: 184724
ServerID: perforce.ravenbrook.com
2014-03-11 15:46:51 +00:00
Richard Brooksby
4e28809e4a
Responding to code review. see < https://info.ravenbrook.com/mail/2014/03/04/12-02-27/0/ >.
...
Copied from Perforce
Change: 184669
ServerID: perforce.ravenbrook.com
2014-03-07 15:00:54 +00:00
Richard Brooksby
d1473656ee
Resolving questions left behind in fixmes.
...
Copied from Perforce
Change: 184609
ServerID: perforce.ravenbrook.com
2014-02-28 14:42:44 +00:00
Richard Brooksby
d8362f2cad
Merging branch/2014-02-22/splay-tune to pick up splay tree improvements.
...
Copied from Perforce
Change: 184606
ServerID: perforce.ravenbrook.com
2014-02-28 14:27:40 +00:00
Richard Brooksby
0673536606
Fixing res/bool confusion found by “xc/debug/fbmtest 244032167”
...
Copied from Perforce
Change: 184595
ServerID: perforce.ravenbrook.com
2014-02-28 10:53:07 +00: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
14620f8c24
Simplifying the interface to cbsfindinzones.
...
Speeding up CBSFindInZones a bit.
Copied from Perforce
Change: 184589
ServerID: perforce.ravenbrook.com
2014-02-28 01:25:18 +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
3b3e01b10f
Searching the freecbs now respects the “high” preference, though not yet within blocks.
...
Copied from Perforce
Change: 184574
ServerID: perforce.ravenbrook.com
2014-02-26 19:29:05 +00:00
Richard Brooksby
dc83b10c0d
Fixing cbsfindfirstinzones to return a res, because it can fail when it can’t allocate a cbs block, unlike cbsfindfirst.
...
Fixing related corner case in arenaAllocFindInFreeCBS when it thought it couldn’t find a block when it was in fact running out of nodes. This was revealed by “gcbench --npass 1 --arena-size 1M --seed 945632066 --niter 1 amc”.
Fixing draft ArenaFreeCBSDelete after exercising it.
Copied from Perforce
Change: 184568
ServerID: perforce.ravenbrook.com
2014-02-26 17:40:39 +00:00
Richard Brooksby
4fdddc36e0
Backing out zone set summary in the cbs. this isn't needed for speed now that there's a cbs per zone in the arena, and it will slow down all other cbss.
...
Copied from Perforce
Change: 184561
ServerID: perforce.ravenbrook.com
2014-02-26 14:24:34 +00:00
Gareth Rees
6971bee496
Make mps_args_done obsolete.
...
Copied from Perforce
Change: 184543
ServerID: perforce.ravenbrook.com
2014-02-26 12:47:27 +00:00
Richard Brooksby
8f85caa56e
Fixing bug where cbs overwrites its own blockpool pointer with garbage.
...
Copied from Perforce
Change: 184532
ServerID: perforce.ravenbrook.com
2014-02-25 19:19:37 +00:00
Richard Brooksby
b6b306bb48
Pass range bases directly as treekeys, speeding up cbscompare and most cbs operations.
...
Copied from Perforce
Change: 184500
ServerID: perforce.ravenbrook.com
2014-02-24 23:40:50 +00:00
Richard Brooksby
5f9e072412
Bug fix. nonsensical case in cbsfindlargest when size is passed as zero.
...
Added RangeCopy.
Copied from Perforce
Change: 184496
ServerID: perforce.ravenbrook.com
2014-02-24 23:02:42 +00:00
Richard Brooksby
7db856f7b8
Fixed a bug in cbsfindlargest where it always deleted the entire range found even when finddeletelow or finddeletehigh were passed.
...
Copied from Perforce
Change: 184493
ServerID: perforce.ravenbrook.com
2014-02-24 22:48:48 +00:00
Richard Brooksby
a28fda3fc5
Making assertions in cbsupdatenode critical, since this is extremely hot in any cbs with fast find.
...
Copied from Perforce
Change: 184492
ServerID: perforce.ravenbrook.com
2014-02-24 22:27:16 +00:00
Richard Brooksby
b876c0ff82
Only finishing the cbs block pool when cbs created it. oops.
...
Copied from Perforce
Change: 184488
ServerID: perforce.ravenbrook.com
2014-02-24 21:14:40 +00:00