From 4cfdb71d3a5dc6c79ce78f0c121b1d14a7fc7763 Mon Sep 17 00:00:00 2001 From: "Elad.Ash" <18193363+elad335@users.noreply.github.com> Date: Sat, 9 Mar 2024 23:37:35 +0200 Subject: [PATCH] LV2: Longer thread creation delay for low prio threads --- rpcs3/Emu/Cell/lv2/lv2.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/rpcs3/Emu/Cell/lv2/lv2.cpp b/rpcs3/Emu/Cell/lv2/lv2.cpp index 1bade5b7ce..2676ee1d3c 100644 --- a/rpcs3/Emu/Cell/lv2/lv2.cpp +++ b/rpcs3/Emu/Cell/lv2/lv2.cpp @@ -1781,12 +1781,14 @@ bool lv2_obj::awake_unlocked(cpu_thread* cpu, s32 prio) { if (current_ppu->prio.load().prio > lowest_new_priority) { + const bool is_create_thread = current_ppu->gpr[11] == 0x35; + // When not being set to All timers - activate only for sys_ppu_thread_start - if (current_ppu->gpr[11] == 0x35 || g_cfg.core.sleep_timers_accuracy == sleep_timers_accuracy_level::_all_timers) + if (is_create_thread || g_cfg.core.sleep_timers_accuracy == sleep_timers_accuracy_level::_all_timers) { if (!current_ppu->state.test_and_set(cpu_flag::yield) || current_ppu->hw_sleep_time != 0) { - current_ppu->hw_sleep_time += 35; // Seems like 35us after extensive testing + current_ppu->hw_sleep_time += (is_create_thread ? 51 : 35); } else {