Skip to content

Add huge page support for Wasmer linear memory#138

Closed
BlobMaster41 wants to merge 5 commits intomainfrom
test/optimisation
Closed

Add huge page support for Wasmer linear memory#138
BlobMaster41 wants to merge 5 commits intomainfrom
test/optimisation

Conversation

@BlobMaster41
Copy link
Contributor

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.

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.
@BlobMaster41 BlobMaster41 marked this pull request as draft January 17, 2026 04:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant