diff options
author | Björn Gustavsson <[email protected]> | 2019-04-05 10:26:39 +0200 |
---|---|---|
committer | Björn Gustavsson <[email protected]> | 2019-04-05 10:26:39 +0200 |
commit | c0989dcede812c47290f1c61d39e46caa0edf547 (patch) | |
tree | cfdb9482774f27363dfc542e84c646c0053e8f72 /erts/emulator/internal_doc/CarrierMigration.md | |
parent | 041de278a8b8639d5fc975218c39226be3bf1e16 (diff) | |
parent | 07b9eacff8c65df4ac00a21010c748217c908eb9 (diff) | |
download | otp-c0989dcede812c47290f1c61d39e46caa0edf547.tar.gz otp-c0989dcede812c47290f1c61d39e46caa0edf547.tar.bz2 otp-c0989dcede812c47290f1c61d39e46caa0edf547.zip |
Merge branch 'lukas/erl_docgen/add-internal-docs'
OTP-15715
* lukas/erl_docgen/add-internal-docs:
cerl_clauses: Fix broken link
Fix minor typos
Add CountingInstructions to the internal documentation
GarbageCollection.md: Fix links to references
emd2exml: Remove paragraphs around image tags
emd2exml: Clean emphasis markers in link texts
emd2exml: Allow short names of anchors for internal links
Include figures
erts: Fix more internal docs xmllint
compiler: Add internal docs section
erl_docgen: Add new internal docs chapter to docs
Diffstat (limited to 'erts/emulator/internal_doc/CarrierMigration.md')
-rw-r--r-- | erts/emulator/internal_doc/CarrierMigration.md | 27 |
1 files changed, 15 insertions, 12 deletions
diff --git a/erts/emulator/internal_doc/CarrierMigration.md b/erts/emulator/internal_doc/CarrierMigration.md index bb3d8aac28..40f6031ca8 100644 --- a/erts/emulator/internal_doc/CarrierMigration.md +++ b/erts/emulator/internal_doc/CarrierMigration.md @@ -1,6 +1,9 @@ Carrier Migration ================= +Introduction +------------ + The ERTS memory allocators manage memory blocks in two types of raw memory chunks. We call these chunks of raw memory *carriers*. Single-block carriers which only contain one large block, @@ -141,11 +144,11 @@ Since the carrier has been unlinked from the data structure of available free blocks, no more allocations will be made in the carrier. -The allocator instance that created a carrier is called its **owner**. +The allocator instance that created a carrier is called its *owner*. Ownership never changes. The allocator instance that has the responsibility to perform deallocations in a -carrier is called its **employer**. The employer may also perform allocations if +carrier is called its *employer*. The employer may also perform allocations if the carrier is not in the pool. Employment may change when a carrier is fetched from or inserted into the pool. @@ -153,14 +156,14 @@ Deallocations in a carrier, while it remains in the pool, is always performed the owner. That is, all pooled carriers are employed by their owners. Each carrier has an atomic word containing a pointer to the employing allocator -instance and three bit flags; IN_POOL, BUSY and HOMECOMING. +instance and three bit flags; IN\_POOL, BUSY and HOMECOMING. When fetching a carrier from the pool, employment may change and further deallocations in the carrier will be redirected to the new employer using the delayed dealloc functionality. When a foreign allocator instance abandons a carrier back into the pool, it will -also pass it back to its **owner** using the delayed dealloc queue. When doing +also pass it back to its *owner* using the delayed dealloc queue. When doing this it will set the HOMECOMING bit flag to mark it as "enqueued". The owner will later clear the HOMECOMING bit when the carrier is dequeued. This mechanism prevents a carrier from being enqueued again before it has been dequeued. @@ -180,14 +183,14 @@ back to the owner for deallocation using the delayed dealloc functionality. In short: -* The allocator instance that created a carrier **owns** it. -* An empty carrier is always deallocated by its **owner**. -* **Ownership** never changes. -* The allocator instance that uses a carrier **employs** it. -* An **employer** can abandon a carrier into the pool. +* The allocator instance that created a carrier *owns* it. +* An empty carrier is always deallocated by its *owner*. +* *Ownership* never changes. +* The allocator instance that uses a carrier *employs* it. +* An *employer* can abandon a carrier into the pool. * Pooled carriers are not allocated from. -* Pooled carriers are always **employed** by their **owner**. -* **Employment** can only change from **owner** to a foreign allocator +* Pooled carriers are always *employed* by their *owner*. +* *Employment* can only change from *owner* to a foreign allocator when a carrier is fetched from the pool. @@ -229,7 +232,7 @@ carrier. When the cluster gets to the same size as the search limit, all searches will essentially fail. To counter the "bad cluster" problem and also ease the contention, the -search will now always start by first looking at the allocators **own** +search will now always start by first looking at the allocators *own* carriers. That is, carriers that were initially created by the allocator itself and later had been abandoned to the pool. If none of our own abandoned carrier would do, then the search continues into the |