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
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
bdd84a3a0f
Bug fix. ensuring cbsfinddeleterange returns oldrangereturn even if it doesn’t delete a block.
...
Copied from Perforce
Change: 184485
ServerID: perforce.ravenbrook.com
2014-02-24 21:14:39 +00:00
Richard Brooksby
a8720f2615
Adding cbssize and freelistsize functions to calculate the size of freelist contents.
...
Copied from Perforce
Change: 184466
ServerID: perforce.ravenbrook.com
2014-02-23 20:59:44 +00:00
Richard Brooksby
f47100fd09
Permitting tree traversals to abort early.
...
Copied from Perforce
Change: 184511
ServerID: perforce.ravenbrook.com
2014-02-23 15:36:27 +00:00
Richard Brooksby
42a8ffbe6a
Removing unnecessary case of splaying empty trees.
...
Copied from Perforce
Change: 184450
ServerID: perforce.ravenbrook.com
2014-02-23 11:52:21 +00:00
Richard Brooksby
1ac9877082
Adding a signature to splay tree structure. miscellaneous documentation and naming clean-up.
...
Copied from Perforce
Change: 184448
ServerID: perforce.ravenbrook.com
2014-02-23 10:41:15 +00:00
Richard Brooksby
a52bb1d3ea
Implementing pointer-reversing tree traversal that does not disturb the tree shape, unlike the splay tree traversal, which flattens the tree into a list. replacing cbsiterate with this, knocking about 25% off the runtime of the test case: xc/release/djbench -x 1234 --sshift 8 mvff
...
Copied from Perforce
Change: 184444
ServerID: perforce.ravenbrook.com
2014-02-23 10:41:15 +00:00
Richard Brooksby
fee5ac310e
Eliminating redundant passing of tree keys by adding a method to extract the key from a tree node.
...
Copied from Perforce
Change: 184440
ServerID: perforce.ravenbrook.com
2014-02-23 10:41:15 +00:00
Richard Brooksby
6eef655629
Avoiding general compare when searching for first and last nodes in a tree.
...
Copied from Perforce
Change: 184435
ServerID: perforce.ravenbrook.com
2014-02-23 10:41:15 +00:00
Richard Brooksby
15c5b6dfc5
Fixing abuses of res and resfail in the splay tree interface.
...
Copied from Perforce
Change: 184432
ServerID: perforce.ravenbrook.com
2014-02-23 10:41:15 +00:00
Richard Brooksby
d04f3c0bc4
Distinguishing tree keys (treekey) from generic void *.
...
Copied from Perforce
Change: 184429
ServerID: perforce.ravenbrook.com
2014-02-23 10:41:15 +00:00
Richard Brooksby
27373efc5c
Unifying splaycomparemethod with treecompare.
...
Copied from Perforce
Change: 184428
ServerID: perforce.ravenbrook.com
2014-02-23 10:41:15 +00:00
Richard Brooksby
a6d87c91a8
Simplifying splay tree update prototype and removing special null case.
...
Copied from Perforce
Change: 184427
ServerID: perforce.ravenbrook.com
2014-02-23 10:41:15 +00:00
Richard Brooksby
2e5ca2df04
Replacing splaynode with tree generally.
...
Copied from Perforce
Change: 184426
ServerID: perforce.ravenbrook.com
2014-02-23 10:41:15 +00:00
Richard Brooksby
85b11f7b55
Replacing splaynodestruct with treestruct and basic tree navigation operations in the splay tree implementation.
...
Copied from Perforce
Change: 184425
ServerID: perforce.ravenbrook.com
2014-02-23 10:41:15 +00:00
Richard Brooksby
02dd6ce371
Desmurfing the naming conventions in cbs.
...
Copied from Perforce
Change: 184424
ServerID: perforce.ravenbrook.com
2014-02-23 10:41:14 +00:00
Richard Brooksby
f0b07f7bbe
Added a pool argument to cbs creation so that cbss can share a pool. in particular, per-zone allocation cbss for the arena can share a single special block pool.
...
Copied from Perforce
Change: 184469
ServerID: perforce.ravenbrook.com
2014-02-18 13:53:56 +00:00
David Lovemore
15975c2442
Add zone set to cbs nodes for faster zone set allocation.
...
Copied from Perforce
Change: 184299
ServerID: perforce.ravenbrook.com
2014-02-05 15:04:40 +00:00