Richard Brooksby
53bdfaab23
More closely duplicating the allocation policy from the old vmarena, and documenting why.
...
Copied from Perforce
Change: 184601
ServerID: perforce.ravenbrook.com
2014-02-28 13:35:51 +00:00
Richard Brooksby
4eec2493b7
Adding a keyword to the arena to disable zoned allocation.
...
Copied from Perforce
Change: 184599
ServerID: perforce.ravenbrook.com
2014-02-28 13:20:06 +00:00
Richard Brooksby
a1a14a1683
Implementing allocation in the client arena class.
...
Copied from Perforce
Change: 184596
ServerID: perforce.ravenbrook.com
2014-02-28 11:23:59 +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
31b493236c
Reinstating exhaustive splay tree search, since a tree or node may intersect a requested zone set, and be larger than a requested size, but still not satisfy a request.
...
Copied from Perforce
Change: 184594
ServerID: perforce.ravenbrook.com
2014-02-28 10:52:45 +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
1ef160e7b1
Reverting exhaustive search in splayfindfirst and splayfindlast since zoned cbs will use an accurate test on the cbs block zones property, and this code will never be exercised.
...
Copied from Perforce
Change: 184588
ServerID: perforce.ravenbrook.com
2014-02-28 00:47:42 +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
7a33207595
Adding some missing headers revealed by separate compilation.
...
Copied from Perforce
Change: 184584
ServerID: perforce.ravenbrook.com
2014-02-27 18:01:05 +00:00
Richard Brooksby
2d685bee13
Adding check for unexpected case of zone barging.
...
Copied from Perforce
Change: 184583
ServerID: perforce.ravenbrook.com
2014-02-27 17:50:44 +00:00
Richard Brooksby
dee2b3438b
Inserting small ranges into the zone cbss so that they can be reallocated quickly.
...
Copied from Perforce
Change: 184579
ServerID: perforce.ravenbrook.com
2014-02-27 17:01:29 +00:00
Richard Brooksby
6b17c88c69
Implementing splayfindlast to match splayfindfirst. oops.
...
Copied from Perforce
Change: 184578
ServerID: perforce.ravenbrook.com
2014-02-27 16:03:55 +00:00
Richard Brooksby
e6d1db24b6
Simplifying interface to high and low allocation in the zoned cbs.
...
Copied from Perforce
Change: 184576
ServerID: perforce.ravenbrook.com
2014-02-27 12:01:42 +00:00
Richard Brooksby
b160cf778a
Separating arena cbs allocator into abstract zonedcbs adt. the number of chunks seems to blow up.
...
Copied from Perforce
Change: 184575
ServerID: perforce.ravenbrook.com
2014-02-27 04:50:52 +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
6b16beb0c6
Implemented “high” preference allocation for zone stripes.
...
Copied from Perforce
Change: 184573
ServerID: perforce.ravenbrook.com
2014-02-26 18:18:20 +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
c76ae6e629
Removing unused fields from vmarenastruct.
...
Copied from Perforce
Change: 184567
ServerID: perforce.ravenbrook.com
2014-02-26 17:37:16 +00:00
Richard Brooksby
4a1eb8bae3
Adding clarifying bracket.
...
Copied from Perforce
Change: 184566
ServerID: perforce.ravenbrook.com
2014-02-26 17:36:27 +00:00
Richard Brooksby
f215460eb1
Adding checking of the freecbs and zonecbss to arenacheck.
...
Copied from Perforce
Change: 184563
ServerID: perforce.ravenbrook.com
2014-02-26 14:25:01 +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
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
3da21234fd
Implementing arenafreecbsdelete that might work on chunks that have interesting patterns of zone allocation.
...
Further tidying up.
Copied from Perforce
Change: 184531
ServerID: perforce.ravenbrook.com
2014-02-25 19:19:09 +00:00
Richard Brooksby
d1b6ad25c7
Tidying up and wrapping arena cbs operations.
...
Copied from Perforce
Change: 184530
ServerID: perforce.ravenbrook.com
2014-02-25 16:58:23 +00:00
Richard Brooksby
460f988a46
Removing the freering allocation cache, which breaks the cbs abstraction and does not give any benefit once we’re allocating from zonecbss.
...
Copied from Perforce
Change: 184529
ServerID: perforce.ravenbrook.com
2014-02-25 11:35:18 +00:00
Richard Brooksby
5a03d625e2
Tidying up arena cbs mfs teardown.
...
Tidying up arena CBS initialisation and teardown.
Copied from Perforce
Change: 184523
ServerID: perforce.ravenbrook.com
2014-02-25 11:16:12 +00:00
Richard Brooksby
08a41a0ad9
Merging gcbench bug fix from master.
...
Copied from Perforce
Change: 184521
ServerID: perforce.ravenbrook.com
2014-02-25 11:15:52 +00:00
Richard Brooksby
8115dbd700
Quick hack at allocating from per-zone cbs. promising performance.
...
Copied from Perforce
Change: 184507
ServerID: perforce.ravenbrook.com
2014-02-25 01:51:27 +00:00
Richard Brooksby
3dcb5c3ea1
Merging bug fix for gcbench exit from development branch.
...
Copied from Perforce
Change: 184506
ServerID: perforce.ravenbrook.com
2014-02-25 01:49:49 +00:00
Richard Brooksby
f9051f09f6
Catch-up merge from master, mainly to pick up gcbench fixes.
...
Copied from Perforce
Change: 184504
ServerID: perforce.ravenbrook.com
2014-02-25 01:29:12 +00:00
Richard Brooksby
5ac2b0b14e
Bug fix. gcbench attempted to delete a nonexistent chain by default.
...
Copied from Perforce
Change: 184497
ServerID: perforce.ravenbrook.com
2014-02-24 23:03:10 +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
dc38189d5c
Adding rangeisempty.
...
Copied from Perforce
Change: 184491
ServerID: perforce.ravenbrook.com
2014-02-24 22:26:22 +00:00
Richard Brooksby
018653d160
Fixing compiler warning.
...
Copied from Perforce
Change: 184490
ServerID: perforce.ravenbrook.com
2014-02-24 22:25:48 +00:00
Gareth Rees
c1ef37731a
Refactor the computation of the chunk size into its own function, thus avoiding an "unreachable code" error from clang.
...
Copied from Perforce
Change: 184482
ServerID: perforce.ravenbrook.com
2014-02-24 21:32:22 +00:00
Richard Brooksby
4f73fc5afe
Initial hack at replacing the arena control pool with mvff.
...
Copied from Perforce
Change: 184489
ServerID: perforce.ravenbrook.com
2014-02-24 21:14:41 +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
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
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
02fd3498d8
Catch-up merge from master, mainly to pick up gcbench fix.
...
Copied from Perforce
Change: 184480
ServerID: perforce.ravenbrook.com
2014-02-24 21:14:13 +00:00
Gareth Rees
09dd8e7027
Avoid use of unreachable code in protcatchthread on os x.
...
Copied from Perforce
Change: 184478
ServerID: perforce.ravenbrook.com
2014-02-24 18:07:14 +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
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
David Lovemore
c34562d0d4
Add pin-leaf option to gcbench.
...
Remove default chain from gcbench.
Copied from Perforce
Change: 184454
ServerID: perforce.ravenbrook.com
2014-02-23 13:44:54 +00:00
Richard Brooksby
8eb1c7b647
Making splaysplit and splayassemble general so that they can be used easily.
...
Copied from Perforce
Change: 184452
ServerID: perforce.ravenbrook.com
2014-02-23 12:18:18 +00:00
Richard Brooksby
bcdce5b35d
Returning the results of splitting in a structure so that it’s easier to pass them on to assemble.
...
Copied from Perforce
Change: 184451
ServerID: perforce.ravenbrook.com
2014-02-23 12:10:52 +00:00