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

1267 commits

Author SHA1 Message Date
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
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
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
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
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
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
Richard Brooksby
2b08236430 Using a more robust page table unmapping method that catches pages previously left mapped in the error page of pagesmarkallocated.
Test run passes.

Copied from Perforce
 Change: 184250
 ServerID: perforce.ravenbrook.com
2014-01-31 02:05:11 +00:00
Richard Brooksby
43602ffd58 Attempting to correct the unmapping of the page table. still doesn’t quite work.
Copied from Perforce
 Change: 184249
 ServerID: perforce.ravenbrook.com
2014-01-31 00:03:32 +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
0296f9c04a Adding spare pages to a ring within each chunk, so that they can be found without a bit table scan.
Spare pages are returned to the OS using the ring in roughly LRU order.
Only enough spare pages are returned to maintain hysteresis, rather than all of them.
Nearly ready to strip out the noSparePages bit table.

Copied from Perforce
 Change: 184245
 ServerID: perforce.ravenbrook.com
2014-01-30 19:58:36 +00:00
Richard Brooksby
f0ca8855e3 Converting some ancient “@@@@“ marked items into todo marked actions.
Copied from Perforce
 Change: 184261
 ServerID: perforce.ravenbrook.com
2014-01-30 19:33:14 +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
d3978def6a Removing unused segpref from ams.
Copied from Perforce
 Change: 184278
 ServerID: perforce.ravenbrook.com
2014-01-30 17:53:17 +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
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
4b50f3688b Adding mps_key_gen generation keyword to pools that take a chain (except amc), so that you can specify which generation to allocate in by default. this allows some flexibility when the client can predict the lifetimes of objects.
The AWL and LO pools allocate into generation 1 of the arena default chain if neither MPS_KEY_CHAIN or MPS_KEY_GEN is specified, simulating the default setup before the chain-zones branch.

Copied from Perforce
 Change: 184231
 ServerID: perforce.ravenbrook.com
2014-01-30 14:27:09 +00:00
Richard Brooksby
17b69133b5 The ams pool no longer requires a chain argument, but defaults to the arena default chain.
Chains passed to the AMS pool are no longer required to contain a single generation, though the AMS will only use the first generation by default.

Copied from Perforce
 Change: 184229
 ServerID: perforce.ravenbrook.com
2014-01-30 13:21:45 +00:00
Richard Brooksby
63f1fcedc2 Converting ams stress test to use keyword arguments.
Copied from Perforce
 Change: 184228
 ServerID: perforce.ravenbrook.com
2014-01-30 13:18:35 +00:00
Richard Brooksby
f30fd7ef84 The chain parameter to amc is now optional, defaulting to the arena’s default chain.
AWL and LO accept a chain parameter, and also default to the arena’s default chain, rather than creating their own dummy chains.

Copied from Perforce
 Change: 184227
 ServerID: perforce.ravenbrook.com
2014-01-30 13:00: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
e02a69f88b The awl and lo pools were allocating their segments along with other pool’s generation 1, while accounting sizes into generation 0. in fact, this “generation 1” was really a kind of placement “clump” and the segments really lived in generation 0. however, this confused the new chainalloc because there are no longer any “clumps” maintained by the arena, causing awlut to fail. fixed awl and lo to be truthful about the generation they’re allocating in. placement concerns have been removed.
Copied from Perforce
 Change: 184220
 ServerID: perforce.ravenbrook.com
2014-01-29 17:15:31 +00:00
Richard Brooksby
eba2dc5a54 Bringing strategy design up to date with changes to zone allocation.
Adding design documents to Xcode project for easier editing and source control.

Copied from Perforce
 Change: 184218
 ServerID: perforce.ravenbrook.com
2014-01-29 15:26:04 +00:00
Richard Brooksby
8e4e0f066e Eliminating dodgy use of *segprefdefault() which could lead to implicit calls to memcpy.
Copied from Perforce
 Change: 184217
 ServerID: perforce.ravenbrook.com
2014-01-29 15:13:22 +00:00
Richard Brooksby
f719851f50 Since the dynamic generation is shared between chains (for some reason) using its unified zone set, rather than keeping a special zone set per chain, which would’ve used up more zones.
Using arena->topGen->mortality for the dynamic generation’s mortality, rather than a global variable.

Copied from Perforce
 Change: 184216
 ServerID: perforce.ravenbrook.com
2014-01-29 13:49:42 +00:00