-
-
Notifications
You must be signed in to change notification settings - Fork 419
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Move heap ownership info from chunk to pagemap (#4371)
Prior to this commit, the chunk kept track of the heap ownership info in the `chunk->actor` field. This worked but was not ideal as noted in the `ponyint_heap_owner` function that this is a case of false sharing where the chunk owner needs the chunk but all other actors only need the chunk owner only. This led to lots of pointer chasing as the pagemap was used to retrieve the chunk pointerand then the chunk had to be loaded to retrieve the owning actor pointer. This commit removes the `chunk->actor` field further slimming down both the `small_chunk` and `large_chunk` so both now fit within 32 bytes (on 64 bit architectures). The chunk ownership information is now kept in the lowest level of the pagemap next to the chunk information. This removes the previous pointer chasing because the chunk owning actor pointer is retrieved at the same time as the chunk pointer without needing to load the chunk itself. This is a fairly standard tradeoff of memory for performance where we're now storing more data in the pagemap to minimize pointer chasing. The expectation is that this will have a net positive impact on performance but no benchmarks have been run to validate this assumption. --------- Co-authored-by: Dipin Hora <[email protected]> Co-authored-by: Sean T Allen <[email protected]>
- Loading branch information
1 parent
2928512
commit 277329e
Showing
9 changed files
with
215 additions
and
89 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.