Performance improvements [4]#28
Merged
Merged
Conversation
Bump RuntimeVersionPostfix and BlobsVersion from .b22 to .b23 for the DotnetVersion 10 variant. Signed-off-by: Maxim Menshikov <maksim.menshikov@nethermind.io>
Move the bump pointer into a fixed-address linker cell (g_zk_bump_ptr at 0xbffefff8) so JIT-emitted inline allocation can reference it by a hardcoded constant and share it with the C allocator. Add __wrap_RhpNewFast, a leaf fixed-size allocator that inlines the downward bump in the same translation unit as mem and the heap bounds, mirroring how x64/arm64 get a tight RhpNewFast helper. Rename the unused __wrap___libc_free parameter to avoid shadowing the mem macro. Signed-off-by: Maxim Menshikov <maksim.menshikov@nethermind.io>
Remove the malloc-based __wrap_RhpNewFast from rhp/module.c. The wrapper now lives in pal/module.c, where the downward bump allocator is inlined directly into it within the same translation unit as the heap bounds, avoiding a nested malloc call and collapsing to a single alignment step in a leaf function. The --wrap=RhpNewFast directive in rhp/module_params.yml still redirects callers to the new location. Signed-off-by: Maxim Menshikov <maksim.menshikov@nethermind.io>
Reserve the top 8 bytes of RAM as a fixed-address cell (g_zk_bump_ptr) holding the downward bump pointer, so the JIT can hardcode its address via lui/addi without relocation and share the pointer with the C allocator in pal/module.c. Lower the kernel heap top by 16 bytes so the cell never overlaps the heap. Signed-off-by: Maxim Menshikov <maksim.menshikov@nethermind.io>
When arguments are supplied, run them via /bin/bash -c in a non-interactive container instead of always dropping into an interactive shell. With no arguments, behavior is unchanged and still opens an interactive bash session. Signed-off-by: Maxim Menshikov <maksim.menshikov@nethermind.io>
When optimizing, append fixed RyuJIT tuning options for the riscv64/ZisK backend: larger stack-allocatable objects, moderately raised inlining caps, inline DMA SequenceEqual lowering, and leaf-method RA save elision. Values are hex-encoded as RyuJIT parses these knobs with NumberStyles.AllowHexSpecifier. Several options depend on companion runtime patches (23, 25, 31, 30_dma_memcmp_inline). Signed-off-by: Maxim Menshikov <maksim.menshikov@nethermind.io>
Replace the poisoned-pointer write in __wrap_RhpThrowEx with a plain exit(1). The deliberate null-ish store was used to trap on unhandled managed exceptions, but exiting the process directly avoids relying on undefined behavior and produces a cleaner termination. Signed-off-by: Maxim Menshikov <maksim.menshikov@nethermind.io>
Reserve the top 8 bytes of the heap region as a fixed-address cell holding the downward bump pointer, shared by the C allocator and JIT-emitted inline allocation. Lower the heap top by 16 so the cell never overlaps the heap. zisk_sim reuses the zisk pal.o, so it needs the same g_zk_bump_ptr symbol; mirrors modules/zkvm_zisk/script.ld. Signed-off-by: Maxim Menshikov <maksim.menshikov@nethermind.io>
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.
No description provided.