1
0
mirror of https://github.com/RPCS3/rpcs3.git synced 2024-11-26 04:32:35 +01:00

PPU/reservations: send thread notification only if data changed

This commit is contained in:
Eladash 2024-04-12 08:40:40 +03:00 committed by Elad Ashkenazi
parent b6bfde6d64
commit 103b2fe5fd

View File

@ -3481,17 +3481,17 @@ static bool ppu_store_reservation(ppu_thread& ppu, u32 addr, u64 reg_value)
{
extern atomic_t<u32> liblv2_begin, liblv2_end;
const u32 notify = ppu.res_notify;
if (notify)
{
vm::reservation_notifier(notify).notify_all();
ppu.res_notify = 0;
}
// Avoid notifications from lwmutex or sys_spinlock
if (ppu.cia < liblv2_begin || ppu.cia >= liblv2_end)
if (new_data != old_data && (ppu.cia < liblv2_begin || ppu.cia >= liblv2_end))
{
const u32 notify = ppu.res_notify;
if (notify)
{
vm::reservation_notifier(notify).notify_all();
ppu.res_notify = 0;
}
if (!notify)
{
// Try to postpone notification to when PPU is asleep or join notifications on the same address