From 1e269751bf767395bacf08df10f34879b57d322a Mon Sep 17 00:00:00 2001 From: Nekotekina Date: Sat, 14 Nov 2020 11:12:58 +0300 Subject: [PATCH] Temporarily disable memory locking if TSX is not used It's a very heavy operation that could cause some problem under mutex lock. --- rpcs3/Emu/Memory/vm.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/rpcs3/Emu/Memory/vm.cpp b/rpcs3/Emu/Memory/vm.cpp index 6276e86c0d..c483e3581f 100644 --- a/rpcs3/Emu/Memory/vm.cpp +++ b/rpcs3/Emu/Memory/vm.cpp @@ -766,7 +766,11 @@ namespace vm perf_meter<"PAGE_LCK"_u64> perf1; - if (!utils::memory_lock(g_sudo_addr + addr, size)) + if (!g_use_rtm) + { + perf1.reset(); + } + else if (!utils::memory_lock(g_sudo_addr + addr, size)) { vm_log.error("Failed to lock memory. Consider increasing your system limits.\n" "addr=0x%x, size=0x%x, shm=%d, shm:[f=%d,l=%u]", addr, size, +!!shm, shm ? shm->flags() : 0, shm ? shm->info : 0);