SPU: Update RdEventStat Busy Wait detection to updated setting behavior

This commit is contained in:
Elad
2025-08-19 12:04:35 +03:00
committed by Elad
parent 246519c5e1
commit 6e7c3362b3
+2 -12
View File
@@ -4652,7 +4652,7 @@ u32 evaluate_spin_optimization(std::span<u8> stats, u64 evaluate_time, const cfg
add_count = 0;
}
if (inclined_for_responsiveness && std::count(old_stats.data(), old_stats.data() + 3, 0) >= 2)
if (stats.size() == 16 && inclined_for_responsiveness && std::count(old_stats.data(), old_stats.data() + 3, 0) >= 2)
{
add_count = 0;
}
@@ -6056,11 +6056,6 @@ s64 spu_thread::get_ch_value(u32 ch)
const usz seed = (utils::get_tsc() >> 8) % 100;
#ifdef __linux__
const bool reservation_busy_waiting = false;
#else
const bool reservation_busy_waiting = (seed + ((raddr == spurs_addr) ? 50u : 0u)) < g_cfg.core.spu_reservation_busy_waiting_percentage;
#endif
usz cache_line_waiter_index = umax;
auto check_cache_line_waiter = [&]()
@@ -6246,8 +6241,7 @@ s64 spu_thread::get_ch_value(u32 ch)
}
}
// Don't busy-wait with TSX - memory is sensitive
if (g_use_rtm || !reservation_busy_waiting)
if (true)
{
if (u32 work_count = g_spu_work_count)
{
@@ -6374,10 +6368,6 @@ s64 spu_thread::get_ch_value(u32 ch)
}
#endif
}
else
{
busy_wait();
}
continue;
}