1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2025-12-18 11:50:38 -08:00
Commit graph

113 commits

Author SHA1 Message Date
Richard Brooksby
a3efd2d694 Catch-up merge from branch/2015-08-06/config to remove arenaconfigure.
Copied from Perforce
 Change: 189335
 ServerID: perforce.ravenbrook.com
2016-02-25 22:59:06 +00:00
Richard Brooksby
eac348d664 Catch-up merge from masters.
Copied from Perforce
 Change: 188921
 ServerID: perforce.ravenbrook.com
2016-01-19 16:22:39 +00:00
Gareth Rees
b4db3bd09f Introduce new type work representing a measure of work done by the collector. use this systematically to make the code clearer.
Copied from Perforce
 Change: 188210
 ServerID: perforce.ravenbrook.com
2015-09-03 13:01:55 +01:00
Gareth Rees
511ec1c025 Catch-up merge from branch/2015-08-10/arena-create to branch/2015-08-06/config.
Copied from Perforce
 Change: 188104
 ServerID: perforce.ravenbrook.com
2015-08-10 12:49:36 +01:00
Gareth Rees
6359b0ed98 Merge branch/2014-09-29/reserved into the master sources.
Copied from Perforce
 Change: 188090
 ServerID: perforce.ravenbrook.com
2015-08-07 16:33:43 +01:00
Gareth Rees
703c1ee5f5 New function mps_arena_configure provides keyword argument interface to changing the properties of an arena.
New keyword arguments MPS_KEY_ARENA_COMMIT_LIMIT and MPS_KEY_SPARE_ARENA_COMMIT_LIMIT can be passed to mps_arena_create_k or mps_arena_configure.
Deprecate mps_arena_commit_limit_set and mps_arena_spare_commit_limit_set.

Copied from Perforce
 Change: 188085
 ServerID: perforce.ravenbrook.com
2015-08-06 17:02:51 +01:00
Gareth Rees
abbdcfc59f Assert if a thread dies while registered, but make a best effort to continue working after the assertion, by marking the thread as dead and moving it to a ring of dead threads.
Copied from Perforce
 Change: 187393
 ServerID: perforce.ravenbrook.com
2014-10-25 17:41:42 +01:00
Gareth Rees
72a38afb68 Remove unused pool {fill,empty}{mutator,internal}size statistics.
Copied from Perforce
 Change: 187270
 ServerID: perforce.ravenbrook.com
2014-10-14 22:37:55 +01:00
Gareth Rees
72209444c0 Store reserved address space associated with chunk in a field in the chunkstruct, as suggested by rb in <https://info.ravenbrook.com/mail/2014/10/01/13-55-44/0/>.
Copied from Perforce
 Change: 187104
 ServerID: perforce.ravenbrook.com
2014-10-01 21:40:50 +01:00
Gareth Rees
53c5301a9e Instead of iterating over the chunks to compute the total reserved address space, maintain a running total in arenachunkinsert and (new function) arenachunkremoved.
New arena class method chunkReserved handles the class-specific computation of the reserved size of a chunk.

Copied from Perforce
 Change: 187089
 ServerID: perforce.ravenbrook.com
2014-09-29 22:50:46 +01:00
Gareth Rees
21f6addf6c Rename mps_class_t to mps_pool_class_t for clarity.
Retain a typedef for mps_class_t for backwards compatibility.

Copied from Perforce
 Change: 187065
 ServerID: perforce.ravenbrook.com
2014-09-27 13:37:38 +01:00
Gareth Rees
7c2e271e60 Rename segpref to locuspref -- this structure describes preferences for the placement of any kind of address, not just segments.
Add LocusPrefDescribe and use it in MVFFDescribe.

Copied from Perforce
 Change: 187061
 ServerID: perforce.ravenbrook.com
2014-09-27 11:27:00 +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