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
1d8238419a
Landiargs -> liargs for terseness and consistency.
...
Copied from Perforce
Change: 185147
ServerID: perforce.ravenbrook.com
2014-04-01 23:39:03 +01:00
Gareth Rees
6beb2ed5f2
First draft of land design.
...
Copied from Perforce
Change: 185146
ServerID: perforce.ravenbrook.com
2014-04-01 23:35:23 +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
Gareth Rees
9d5266c0cc
Improved support for pelles c:
...
* Refactor nmake files so that a compiler-specific makefile is included; move Microsoft Visual C-specific options to mv.nmk.
* Add nmake files for Pelles (w3i3pc.nmk and pc.nmk).
* Rename spw3i3mv.c to spw3i3.c and spw3i6mv.c to spw3i6.c since these are also used by Pelles C.
* Make reasonable changes to the source code to avoid warnings from Pelles C:
** check results of function calls;
** avoid useless return values;
** undef max before defining it;
** ensure printf formats are checkable;
** move notreached() assertions to the end of blocks;
** suppress warnings in cases where the code shouldn't be changed ("Unreachable code", "Inline assembly code is not portable", "Structured Exception Handling is not portable").
Copied from Perforce
Change: 184977
ServerID: perforce.ravenbrook.com
2014-03-24 18:23:29 +00:00
Richard Brooksby
061eba523c
Reponding to code review < https://info.ravenbrook.com/mail/2014/03/10/17-01-58/0/ >.
...
Renaming the arena’s “zoned CBS” back to earlier “free CBS”, especially since it might not be zoned.
Copied from Perforce
Change: 184738
ServerID: perforce.ravenbrook.com
2014-03-11 17:27:57 +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
1956b0cee1
Restoring error path for arenaalloc.
...
Copied from Perforce
Change: 184604
ServerID: perforce.ravenbrook.com
2014-02-28 13:48:56 +00:00
Richard Brooksby
fcd691aaa3
Adding unzoned arena tests back, now that there is a method of asking for them.
...
Copied from Perforce
Change: 184602
ServerID: perforce.ravenbrook.com
2014-02-28 13:46:36 +00:00
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
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
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
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
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
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
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
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
c58eed5c6b
Attempting to combine fast page allocation with cbs allocation. currently not working properly, as the cbs and free page rings overlap.
...
Copied from Perforce
Change: 184471
ServerID: perforce.ravenbrook.com
2014-02-19 11:04:18 +00:00
Richard Brooksby
5afbb9d290
Adding per-zone arena cbss, but they aren’t filled with any free space yet.
...
Copied from Perforce
Change: 184470
ServerID: perforce.ravenbrook.com
2014-02-18 13:53:56 +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
Richard Brooksby
2151d00c7f
Catch-up merge from master, mainly to pick up spare-ring merge.
...
Copied from Perforce
Change: 184365
ServerID: perforce.ravenbrook.com
2014-02-18 13:47:49 +00:00
Richard Brooksby
3a1236d0ea
Generic chunkinit and chunkdestroy now maintain their memory in the freecbs so that the client arena should also work.
...
ArenaDestroy fixed so that ChunkDestroy can go ahead even though the freeCBS has been torn down. Allows completion of test programs.
Copied from Perforce
Change: 184295
ServerID: perforce.ravenbrook.com
2014-02-04 18:50:56 +00:00
Richard Brooksby
252383465b
Abolishing vmarenaalloc and its horrible relatives.
...
Removing redundant SegPref structures from pools that only ever used the default.
Abolishing the VMNZ arena class, to be replaced with an option to ArenaCreate.
Copied from Perforce
Change: 184293
ServerID: perforce.ravenbrook.com
2014-02-04 18:10:53 +00:00
Richard Brooksby
2c3c67e73e
Deleting a chunk’s address range from the arena’s freecbs when the chunk is destroyed. otherwise, the memory gets allocated and an assertion fires when that memory is not in any chunk.
...
Copied from Perforce
Change: 184281
ServerID: perforce.ravenbrook.com
2014-02-01 00:34:52 +00:00
Richard Brooksby
ae6362a7ce
Adding arena extension back to the arena allocation policy.
...
Copied from Perforce
Change: 184280
ServerID: perforce.ravenbrook.com
2014-01-31 22:47:29 +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
ce329f192e
Abolishing the spare pages bit table.
...
Not quite working yet. This code fails to unmap unused page table pages, and so triggers an assertion at chunk finish.
Copied from Perforce
Change: 184246
ServerID: perforce.ravenbrook.com
2014-01-30 19:58:36 +00:00
Richard Brooksby
7a73e98638
Refactored implementation of preferenced allocation policy from vm arena to general purpose arena.
...
Eliminating SegPrefExpress in most places, especially where there wasn’t really any preference.
Eliminating special case knowledge about garbage collection from the arena.
Copied from Perforce
Change: 184279
ServerID: perforce.ravenbrook.com
2014-01-30 18:08:10 +00:00
Richard Brooksby
d75cfe191c
Incorporating early commit limit checking into arena allocation policy.
...
Copied from Perforce
Change: 184240
ServerID: perforce.ravenbrook.com
2014-01-30 15:44:46 +00:00
Richard Brooksby
973575140f
Abstracting the allocation policy from arenaalloc in order to implement arena extension policy.
...
Copied from Perforce
Change: 184239
ServerID: perforce.ravenbrook.com
2014-01-30 15:44:46 +00:00
Richard Brooksby
e50418ce54
Tidying up the bootstrap so that every chunk gets added to the arena’s freecbs.
...
Copied from Perforce
Change: 184238
ServerID: perforce.ravenbrook.com
2014-01-30 15:44:46 +00:00
Richard Brooksby
a1d6492998
Generalising allocation of initial page for the arena’s freecbs so that it can be used when new chunks are added.
...
Copied from Perforce
Change: 184237
ServerID: perforce.ravenbrook.com
2014-01-30 15:44:46 +00:00
Richard Brooksby
69895308e5
Hacky clean-up of the cbs' mfs tracts so that the arena can shut down successfully.
...
Copied from Perforce
Change: 184072
ServerID: perforce.ravenbrook.com
2014-01-21 16:10:16 +00:00
Richard Brooksby
be42effdb3
First draft of freeing into the arena's freecbs.
...
Copied from Perforce
Change: 184052
ServerID: perforce.ravenbrook.com
2014-01-18 18:24:07 +00:00
Richard Brooksby
32d8c32b6d
Making the reservoir use arenaalloc and arenafree like a good citizen, rather than bypassing them, so that it correctly gets memory from the freecbs.
...
Copied from Perforce
Change: 184051
ServerID: perforce.ravenbrook.com
2014-01-18 17:45:56 +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
44de7246e5
Creating and tearing down the arena freecbs that will hold free address ranges.
...
Copied from Perforce
Change: 184049
ServerID: perforce.ravenbrook.com
2014-01-18 16:25:08 +00:00
Richard Brooksby
c71a9513e0
Adding a free address space cbs to the arena, initialising and finishing it, but not using it yet.
...
Moved CBSStruct to mpmst.h so that it can be included inline in ArenaStruct without circularity problems.
Copied from Perforce
Change: 184044
ServerID: perforce.ravenbrook.com
2014-01-17 16:15:13 +00:00