Add huge page support for Wasmer linear memory#138
Closed
BlobMaster41 wants to merge 5 commits intomainfrom
Closed
Add huge page support for Wasmer linear memory#138BlobMaster41 wants to merge 5 commits intomainfrom
BlobMaster41 wants to merge 5 commits intomainfrom
Conversation
Introduces modules for huge page memory management, including explicit and transparent huge page allocation, and a custom LinearMemory implementation using huge pages. Adds benchmarking and integration tests to compare performance and verify correct fallback behavior. Updates WasmerRunner to support huge page configuration in engine and tunable creation.
Bump various crate dependencies to their latest versions in Cargo.lock and Cargo.toml, including adding libc as a dependency. Update the Rust toolchain channel from 1.91.1 to 1.92.0 in rust-toolchain.toml.
Adds an optional external_vm_definition field to HugePageLinearMemory to allow updating an external VMMemoryDefinition when provided. Updates memory allocation and definition update logic to handle both internal and external VM memory definitions, ensuring compiled WebAssembly code accesses the correct memory location.
Improves allocation to reserve the full region with PROT_NONE, then remaps only the accessible portion with huge pages if possible, following Wasmer's approach. Guard pages remain PROT_NONE and do not consume physical memory. Adds more detailed logging and clarifies fallback behavior for huge page and mlock failures.
Introduces debug logging for memory creation methods in LimitingTunables when the 'debug-metering' feature is enabled. Also updates the default huge page configuration and refines code formatting and initialization of the env_logger in main to avoid double initialization errors.
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Introduces modules for huge page memory management, including explicit and transparent huge page allocation, and a custom LinearMemory implementation using huge pages. Adds benchmarking and integration tests to compare performance and verify correct fallback behavior. Updates WasmerRunner to support huge page configuration in engine and tunable creation.