Richard Brooksby
96be04cb42
Lifting zig and zag cases into common prefix to shorten splaysplit. a few percent faster.
...
Copied from Perforce
Change: 184446
ServerID: perforce.ravenbrook.com
2014-02-23 10:41:15 +00:00
Richard Brooksby
660c0821d6
Moving downward splay updates to after side tree linkage, allowing the optimiser to do a better job. produces about 10% speedup: xc/release/djbench -x 1234 --sshift 8 mvff
...
Copied from Perforce
Change: 184445
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
4e1d9e6a96
Optimising splaytreeneighbours by observing that once one neighbour is found, the other neighbour is already in our hand in one of the side trees. this reduces the number of splays when coalescing.
...
Copied from Perforce
Change: 184443
ServerID: perforce.ravenbrook.com
2014-02-23 10:41:15 +00:00
Richard Brooksby
d48028902e
Specialising left and right splay tree searches where no comparisons are necessary.
...
Copied from Perforce
Change: 184442
ServerID: perforce.ravenbrook.com
2014-02-23 10:41:15 +00:00
Richard Brooksby
17b72c3052
Adding tree integrity check debugging function.
...
Copied from Perforce
Change: 184441
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
2bb859f62b
Avoid dropping children of found node in non-update case. oops.
...
Copied from Perforce
Change: 184439
ServerID: perforce.ravenbrook.com
2014-02-23 10:41:15 +00:00
Richard Brooksby
f951709e99
Lifting out pointer-reversed updates.
...
Copied from Perforce
Change: 184438
ServerID: perforce.ravenbrook.com
2014-02-23 10:41:15 +00:00
Richard Brooksby
93a0ffe8ee
Generalising pointer reversal of tree spines.
...
Copied from Perforce
Change: 184437
ServerID: perforce.ravenbrook.com
2014-02-23 10:41:15 +00:00
Richard Brooksby
35ab73ab4a
Reducing excessive punctuation and removing unnecessary goto cases in splaysplay.
...
Copied from Perforce
Change: 184436
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
6219c50ca1
Fixing splaytreefind on empty tree. oops.
...
Regression test: xc/Debug/fbmtest 215526357
Copied from Perforce
Change: 184434
ServerID: perforce.ravenbrook.com
2014-02-23 10:41:15 +00:00
Richard Brooksby
5cdcef0154
Splaysplay returns a compare to indicate the relationship of the new tree root to the key, eliminating some redundant tests, and making it more like treefind.
...
Allowing SplayTreeNext to deal with modification during iteration, so that iteration can be used to delete trees, for example.
Copied from Perforce
Change: 184433
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
6bc35c5ca0
Generalising splayrotate operations into treerotates.
...
Copied from Perforce
Change: 184431
ServerID: perforce.ravenbrook.com
2014-02-23 10:41:15 +00:00
Richard Brooksby
c446abda38
Replacing null with treeempty where that is intended.
...
Copied from Perforce
Change: 184430
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
96473a433e
Adding basic generic binary tree datatype.
...
Copied from Perforce
Change: 184423
ServerID: perforce.ravenbrook.com
2014-02-23 10:41:07 +00:00
Gareth Rees
19fa48cba5
Catch-up merge from master sources to nailboard branch.
...
Copied from Perforce
Change: 184402
ServerID: perforce.ravenbrook.com
2014-02-20 14:48:39 +00:00
Richard Brooksby
005a9d56da
Detaching buffers from segments before freeing them in mvt.
...
Copied from Perforce
Change: 184389
ServerID: perforce.ravenbrook.com
2014-02-19 13:58:37 +00:00
Richard Brooksby
2efd201955
Declaring result codes using a relational macro, so that tests can print more meaningful output, and to eliminate redundant code.
...
Copied from Perforce
Change: 184382
ServerID: perforce.ravenbrook.com
2014-02-19 11:55:43 +00:00
Richard Brooksby
d1e7a30752
Removing unused variable discovered by gcc.
...
Copied from Perforce
Change: 184380
ServerID: perforce.ravenbrook.com
2014-02-19 10:55:10 +00:00
Richard Brooksby
121113c697
Fixing up the build on freebsd (fri3gc)
...
Copied from Perforce
Change: 184356
ServerID: perforce.ravenbrook.com
2014-02-17 17:00:08 +00:00
Richard Brooksby
4fc8971802
Minor updates in response to review. see https://info.ravenbrook.com/mail/2014/02/17/16-27-18/0/
...
Copied from Perforce
Change: 184354
ServerID: perforce.ravenbrook.com
2014-02-17 16:45:12 +00:00
Richard Brooksby
d8cb7e9a01
Catch-up merge from master, mainly to pick up chain-zones merge.
...
Copied from Perforce
Change: 184343
ServerID: perforce.ravenbrook.com
2014-02-14 15:23:36 +00:00
Richard Brooksby
e6ff3a648f
Merging branch //info.ravenbrook.com/project/mps/branch/2014-01-29/mps-chain-zones/... into master.
...
Copied from Perforce
Change: 184342
ServerID: perforce.ravenbrook.com
2014-02-14 15:15:07 +00:00
Richard Brooksby
2b0f94df6c
Responding to review comments. see < https://info.ravenbrook.com/mail/2014/02/14/14-38-07/0/ >.
...
Copied from Perforce
Change: 184340
ServerID: perforce.ravenbrook.com
2014-02-14 15:05:18 +00:00
Richard Brooksby
8679bb210f
Catch-up merge from master, mainly to pick up gcbench.
...
Copied from Perforce
Change: 184335
ServerID: perforce.ravenbrook.com
2014-02-12 17:39:31 +00:00
Richard Brooksby
bc47522ae2
Abstracting partially mapped page tables into a sparsearray abstract datatype, removing a great deal of complexity from the vm arena, and some unnecessary double-initialisation and scanning loops during allocation.
...
Copied from Perforce
Change: 184333
ServerID: perforce.ravenbrook.com
2014-02-12 17:32:20 +00:00
Richard Brooksby
e0c2c23d00
Clarifying how the beginning of the page table gets unmapped.
...
Copied from Perforce
Change: 184332
ServerID: perforce.ravenbrook.com
2014-02-12 15:06:04 +00:00
Richard Brooksby
e9f3f70cce
Responding to review comments. see < https://info.ravenbrook.com/mail/2014/02/12/11-30-00/0/ >.
...
Copied from Perforce
Change: 184331
ServerID: perforce.ravenbrook.com
2014-02-12 11:31:00 +00:00
Richard Brooksby
e59678ecf9
Purging half of the spare memory, rather than just enough to get under the limit, so that there aren’t many small unmaps, and many scans for spare pages.
...
Copied from Perforce
Change: 184326
ServerID: perforce.ravenbrook.com
2014-02-11 18:26:00 +00:00
Richard Brooksby
9e057d1bcc
Fixing boundary cases for unmapping page table pages when there aren’t a nice whole number of descriptors on each page.
...
Copied from Perforce
Change: 184325
ServerID: perforce.ravenbrook.com
2014-02-11 17:18:21 +00:00
Richard Brooksby
f1d5750639
Adding a cache of free pages per zone to the arena, so that we recycle single pages fast, especially after each reclaim.
...
Copied from Perforce
Change: 184324
ServerID: perforce.ravenbrook.com
2014-02-11 15:23:32 +00:00
Richard Brooksby
9bc635b24d
Further tidying up of the page descriptor and naming.
...
Copied from Perforce
Change: 184323
ServerID: perforce.ravenbrook.com
2014-02-11 14:14:16 +00:00
Richard Brooksby
f9e9805b39
Encoding the page state in the bottom two bits of the first field, rather than using up a whole word, in order to make room for a free list pointer.
...
Copied from Perforce
Change: 184322
ServerID: perforce.ravenbrook.com
2014-02-11 13:41:57 +00:00
David Lovemore
14a09c99a3
Add gcbench, a parameterizable benchmark for gc pools.
...
Copied from Perforce
Change: 184312
ServerID: perforce.ravenbrook.com
2014-02-11 11:54:27 +00:00
Richard Brooksby
f8ac78ba0f
Improving commentary on page table unmapping code in response to review. see < https://info.ravenbrook.com/mail/2014/01/31/17-26-12/0/ >.
...
Copied from Perforce
Change: 184291
ServerID: perforce.ravenbrook.com
2014-02-04 16:56:36 +00:00
Gareth Rees
ad5b956475
Bump version and copyright.
...
Copied from Perforce
Change: 184275
ServerID: perforce.ravenbrook.com
2014-01-31 16:41:37 +00:00
Richard Brooksby
8a3dc7c98a
Fixing gcc warnings found in https://travis-ci.org/ravenbrook/mps-temporary/jobs/17977403
...
Copied from Perforce
Change: 184271
ServerID: perforce.ravenbrook.com
2014-01-31 15:49:14 +00:00
Richard Brooksby
9cec005f66
Fixing awl and lo to actually allocate in the generation requested.
...
Copied from Perforce
Change: 184269
ServerID: perforce.ravenbrook.com
2014-01-31 15:27:51 +00:00
Richard Brooksby
66a05e1f05
Changes from review comments made in < https://info.ravenbrook.com/mail/2014/01/31/13-40-25/0/ >.
...
ArenaSpareCommitExceeded changed to ArenaPurgeSpare so that the arena can properly reduce the amount of spare memory when setting the commit limit etc.
pagesMarkAllocated promptly unmaps page table pages in its error path.
Miscellaneous clarifications and extra checking.
Copied from Perforce
Change: 184267
ServerID: perforce.ravenbrook.com
2014-01-31 15:21:21 +00:00
Richard Brooksby
34f5aece3d
Clarifying a comment.
...
Copied from Perforce
Change: 184262
ServerID: perforce.ravenbrook.com
2014-01-31 13:50:16 +00:00
Richard Brooksby
7526f5abe8
Keeping a single ring of spare chunks in the vm arena, in lru order, so that spare pages are unmapped closer to lru.
...
Copied from Perforce
Change: 184251
ServerID: perforce.ravenbrook.com
2014-01-31 09:36:42 +00:00