From 9fae048a5a2c63777c080f0c432d31997de7478a Mon Sep 17 00:00:00 2001 From: CamilleLaVey Date: Wed, 27 Aug 2025 21:28:23 +0200 Subject: [PATCH] revert [jit] Increase x86_64 default code size to full 2GiB hugepage (#318) (#337) revert [jit] Increase x86_64 default code size to full 2GiB hugepage (#318) Abuses the existence of transparent huge pages on Unix. 4*2 = 8GiB virtual memory used total by JIT. May reduce native host TLB trees. -------------- WIP: Wasn't meant to be merged, it's going to be refined to be added later when more data/ testing have been made about this approach. Signed-off-by: lizzie Reviewed-on: https://git.eden-emu.dev/eden-emu/eden/pulls/318 Reviewed-by: Shinmegumi Co-authored-by: lizzie Co-committed-by: lizzie Reviewed-on: https://git.eden-emu.dev/eden-emu/eden/pulls/337 Co-authored-by: CamilleLaVey Co-committed-by: CamilleLaVey --- src/core/arm/dynarmic/arm_dynarmic_32.cpp | 2 +- src/core/arm/dynarmic/arm_dynarmic_64.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/core/arm/dynarmic/arm_dynarmic_32.cpp b/src/core/arm/dynarmic/arm_dynarmic_32.cpp index db159388bf..1731ef1aec 100644 --- a/src/core/arm/dynarmic/arm_dynarmic_32.cpp +++ b/src/core/arm/dynarmic/arm_dynarmic_32.cpp @@ -215,7 +215,7 @@ std::shared_ptr ArmDynarmic32::MakeJit(Common::PageTable* pa #ifdef ARCHITECTURE_arm64 config.code_cache_size = std::uint32_t(128_MiB); #else - config.code_cache_size = std::uint32_t(2_GiB); + config.code_cache_size = std::uint32_t(512_MiB); #endif // Allow memory fault handling to work diff --git a/src/core/arm/dynarmic/arm_dynarmic_64.cpp b/src/core/arm/dynarmic/arm_dynarmic_64.cpp index dcff0ddf3f..9674e88d9d 100644 --- a/src/core/arm/dynarmic/arm_dynarmic_64.cpp +++ b/src/core/arm/dynarmic/arm_dynarmic_64.cpp @@ -273,7 +273,7 @@ std::shared_ptr ArmDynarmic64::MakeJit(Common::PageTable* pa #ifdef ARCHITECTURE_arm64 config.code_cache_size = std::uint32_t(128_MiB); #else - config.code_cache_size = std::uint32_t(2_GiB); + config.code_cache_size = std::uint32_t(512_MiB); #endif // Allow memory fault handling to work