1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2025-12-14 10:00:25 -08:00
Commit graph

77 commits

Author SHA1 Message Date
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
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
Richard Brooksby
cd4a12047f Non-working preferential allocation within a block of the cbs.
This doesn't work because the splay tree can't cope with homing in on a node (that appears big enough) then being told that it isn't suitable (because it doesn't have space in the right zone).  The splay tree summary condition must be precise, as stated in the design.  The splay tree isn't suited to this kind of search.

Copied from Perforce
 Change: 184073
 ServerID: perforce.ravenbrook.com
2014-01-21 16:29:30 +00:00
Richard Brooksby
6954977079 First draft of allocating using the freecbs. arenaalloc finds a free address range in the cbs and asks the arena class to mark it allocated, rather than the arena class doing the search. plenty still missing. no freeing.
Copied from Perforce
 Change: 184050
 ServerID: perforce.ravenbrook.com
2014-01-18 17:16:10 +00:00
Richard Brooksby
9eeaa3a388 Inlining the mfs block pool's structure into its parent mfs, to avoid allocating in the control pool when initialising a cbs. this will allow the cbs to be used before the control pool exists.
Copied from Perforce
 Change: 184043
 ServerID: perforce.ravenbrook.com
2014-01-17 15:48:12 +00:00
Gareth Rees
e6605cc39c Tidying up in anticipation of review.
Copied from Perforce
 Change: 182524
 ServerID: perforce.ravenbrook.com
2013-06-04 23:49:48 +01:00
Gareth Rees
ca36e1a147 Cbsdelete() now returns the isolated contiguous range that was found, even if the requested deletion operation cannot be performed. (this is so that the caller can try deleting the whole block instead and manage the fragments using a fallback strategy.)
CBSFindLargest() takes a size argument, so that the caller doesn't have to re-insert the found block if it wasn't large enough.

Copied from Perforce
 Change: 182431
 ServerID: perforce.ravenbrook.com
2013-06-03 16:16:04 +01:00
Gareth Rees
0260380dd3 Rename cbstest.c to fbmtest.c (free block management test) and generalize it so that it tests both the cbs and freelist modules.
Split FreelistFind into FreelistFindFirst and FreelistFindLast so that the interface exactly matches the CBS interface.
Fix errors in freelist.c: missing computation of size in FreelistBlockSetLimit; update linked list correct in coalesceRight case in FreelistInsert.
Avoid compiler warnings in freelist.c.
In cbs.c: use $U for Booleans ($B is for bit tables).

Copied from Perforce
 Change: 182397
 ServerID: perforce.ravenbrook.com
2013-06-02 21:34:23 +01:00
Gareth Rees
db9328da7a Use range objects in the cbs interface instead of base, limit pairs. the idea is that freelist and cbs should offer similar interfaces so that the testing code can be shared.
Copied from Perforce
 Change: 182364
 ServerID: perforce.ravenbrook.com
2013-05-31 16:29:26 +01:00
Gareth Rees
934ae05ca3 Rename the enumeration cbsfinddelete to finddelete in anticipation of it being shared between cbs and new freelist module.
Since ABQDisposition enumeration only has two values, it's better to use Bool.

Copied from Perforce
 Change: 182347
 ServerID: perforce.ravenbrook.com
2013-05-31 00:09:33 +01:00
Gareth Rees
caf1945985 Clarify the logic in cbsinsertintotree to match cbsdeletefromtree.
Copied from Perforce
 Change: 182344
 ServerID: perforce.ravenbrook.com
2013-05-30 20:09:01 +01:00
Gareth Rees
71ab5adf66 Separate block allocation from block insertion, so that cbsdeletefromtree no longer leaves the tree in an inconsistent state if allocation fails.
Simplify the case logic in cbsDeleteFromTree to try to make it clearer.
Explain why cbsDeleteFromTree can't fail when it's called from cbsFindDeleteRange.

Copied from Perforce
 Change: 182342
 ServerID: perforce.ravenbrook.com
2013-05-30 19:22:56 +01:00
Gareth Rees
4c5bca4bd0 Fix review comments from rb in <https://info.ravenbrook.com/mail/2013/05/23/18-17-17/0/>
Copied from Perforce
 Change: 182149
 ServerID: perforce.ravenbrook.com
2013-05-24 00:48:19 +01:00
Richard Brooksby
5d5e2cac05 Deleting some obsolete comment text about callbacks.
Renaming cbsBlockShrink to cbsBlockShrunk and cbsBlockGrow to cbsBlockGrew, since they don't *do* those things, just record that they were done.
Tidying up Find functions, where deletion of emergency code had left some strange double nestings.

Copied from Perforce
 Change: 182120
 ServerID: perforce.ravenbrook.com
2013-05-23 19:05:25 +01:00
Gareth Rees
ad523a34ef Remove unused variable oldsize.
Copied from Perforce
 Change: 182111
 ServerID: perforce.ravenbrook.com
2013-05-23 12:50:57 +01:00
Gareth Rees
5ea309b5cc Catch-up merge from master sources to branch/2013-05-17/emergency.
Copied from Perforce
 Change: 182048
 ServerID: perforce.ravenbrook.com
2013-05-21 18:31:50 +01:00