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

203 commits

Author SHA1 Message Date
David Lovemore
46d723c9dc Added experimental control over write barrier eagerness.
The write barrier is only raised after three unnecessary scans.

Copied from Perforce
 Change: 186975
 ServerID: perforce.ravenbrook.com
2014-08-21 15:53:57 +01:00
David Lovemore
8c9353fe34 Add mps_key_arena_incremental option.
Avoid read and write barrier in non-incremental mode.
Add --non-incremental option to gcbench

Copied from Perforce
 Change: 186969
 ServerID: perforce.ravenbrook.com
2014-08-20 13:03:20 +01:00
Gareth Rees
a13a1aa1df Catch-up merge from master sources @186564 to branch/2014-06-11/grain.
Copied from Perforce
 Change: 186572
 ServerID: perforce.ravenbrook.com
2014-06-13 15:30:46 +01:00
Gareth Rees
100405cac2 Restore the chunk ring.
Copied from Perforce
 Change: 186558
 ServerID: perforce.ravenbrook.com
2014-06-13 12:31:47 +01:00
Gareth Rees
08f341fcc9 Catch-up merge from master sources @186540 to branch/2014-05-17/chunk-tree.
Copied from Perforce
 Change: 186546
 ServerID: perforce.ravenbrook.com
2014-06-12 17:55:16 +01:00
Gareth Rees
bfb0b771dd Rename "arena alignment" to "arena grain size" to avoid confusion with ordinary structure alignment.
Copied from Perforce
 Change: 186503
 ServerID: perforce.ravenbrook.com
2014-06-11 17:13:03 +01:00
Gareth Rees
de2a30d207 Catch-up merge from master sources @186481 to branch/2014-05-17/chunk-tree.
Copied from Perforce
 Change: 186491
 ServerID: perforce.ravenbrook.com
2014-06-11 13:52:31 +01:00
Gareth Rees
5969ae2114 Catch-up merge from branch/2014-04-15/mvffnoseg @186485 to branch/2014-05-15/size.
Copied from Perforce
 Change: 186487
 ServerID: perforce.ravenbrook.com
2014-06-11 13:17:14 +01:00
Gareth Rees
181767e4db Split land iteration into two functions, one which deletes ranges, the other which does not.
Copied from Perforce
 Change: 186298
 ServerID: perforce.ravenbrook.com
2014-05-25 19:26:48 +01:00
Gareth Rees
2f0ef9355d Clarify tracefix logic by unwinding the nested conditions.
Change the arena's chunk tree from a splay tree to an ordinary tree (so that it's not possible to accidentally splay it and leave it unbalanced).
New function TreeFindNext allows us to implement TractFirst and TractNext without having to splay the tree.
Make sure all operations on the chunk tree leave it balanced. But don't balance the tree directly in ChunkFinish() because this is only ever called in a loop where multiple chunks are being deleted from the tre. Instead use the sequence TreeToVine -- iterate and delete -- TreeBalance. The new macro TREE_DESTROY assists with this.
No need any more for ArenaIsReservedAddr, CHUNK_OF_ADDR, TRACT_OF_ADDR.
Update design documentation.

Copied from Perforce
 Change: 186212
 ServerID: perforce.ravenbrook.com
2014-05-20 18:12:37 +01:00
Gareth Rees
0b0a465674 Replace the chunk ring with a chunk tree.
Fix bug in SplayFindNext (LESS and GREATER the wrong way round).

Copied from Perforce
 Change: 186157
 ServerID: perforce.ravenbrook.com
2014-05-17 17:05:42 +01:00
Gareth Rees
981a266642 New public functions mps_pool_total_size and mps_pool_free_size.
Old (undocumented) functions mps_{mv,mvff,mvt}_size and mps_{mv,mvff,mvt}_free_size are now macros for the new public functions.
New pool methods PoolTotalSize and PoolFreeSize, with implementations for public pool classes except SNC.
Coverage of the new functions in apss and mpmss for the manual pool classes, and in finaltest for the automatic pool classes.

Copied from Perforce
 Change: 186118
 ServerID: perforce.ravenbrook.com
2014-05-15 17:01:59 +01:00
Gareth Rees
87b3880405 New generic function landsize returns the total size of ranges in a land (if the land supports it). implement it for all land classes.
The MVFF pool class doesn't have to maintain its free size any more: it can just call LandSize.
Move re-entrancy protection from CBS to Land. This allows us to remove some CBS functions. (But requires some adjustment in failoverDelete.)
In MVFF, do more checking of mvff->total.

Copied from Perforce
 Change: 185569
 ServerID: perforce.ravenbrook.com
2014-04-15 16:35:34 +01:00
Gareth Rees
4deafee125 Lands maintain the total size of the address ranges they maintain. (this avoids the need to do free size accounting in mvff.)
Copied from Perforce
 Change: 185567
 ServerID: perforce.ravenbrook.com
2014-04-15 14:23:53 +01:00
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
93a79ac8a6 Add -wconversion to the options for gcc. ensure that the mps builds.
Copied from Perforce
 Change: 185463
 ServerID: perforce.ravenbrook.com
2014-04-11 14:25:15 +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
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
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
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
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
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
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
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
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
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
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
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
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
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
e27cf4b361 Merging from branch //info.ravenbrook.com/project/mps/branch/2014-01-29/mps-chain-zones/... in order to eliminate generational considerations from the vm arena's placement policy.
Copied from Perforce
 Change: 184233
 ServerID: perforce.ravenbrook.com
2014-01-30 15:29:46 +00:00
Richard Brooksby
1982233b78 Adding a default chain to the arena. not used anywhere yet.
Copied from Perforce
 Change: 184224
 ServerID: perforce.ravenbrook.com
2014-01-29 18:07:43 +00:00
Richard Brooksby
f1abe0e30f Abolishing the redundant generation to zone map in the vm arena, and replacing it with chainalloc, which allocates segments within a generation.
Generations from different chains will no longer share the same zone sets, and will not be collected together.  To get this behaviour, use the same chain, as documented.

Copied from Perforce
 Change: 184213
 ServerID: perforce.ravenbrook.com
2014-01-29 12:54:05 +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
3e1d93b97d Part of changelist 184047. oops.
Copied from Perforce
 Change: 184048
 ServerID: perforce.ravenbrook.com
2014-01-18 15:46:18 +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
Gareth Rees
ea9df0b2b7 Merge custom cet mainline into the master sources. this includes fixes for job003519 (clock values in text telemetry logs on windows have top 32 bits zero), job003536 (cet office can't replicate 100k snowmen in reasonable time), job003651 (stack overflows are not reliably handled).
Copied from Perforce
 Change: 183926
 ServerID: perforce.ravenbrook.com
2014-01-10 14:16:08 +00:00
Gareth Rees
a3c7ed0cab Turn on -wextra -wwrite-strings when compiling with gcc or clang.
Add missing initializer to mps_args_none.
Change "char *" to "const char *" where necessary.

Copied from Perforce
 Change: 183494
 ServerID: perforce.ravenbrook.com
2013-09-30 17:18:52 +01:00