SPU/PPU atomics performance and LR event fixes (#5435)

* Fix SPU LR event setting in atomic commands according to hw test
* MFC: increment timestamp for PUT cmd in non-tsx path
* MFC: fix reservation lost test on non-tsx path in regard to the lock bit
* Reservation notification moved out of writer_lock scope to reduce its lifetime
* Use passive_lock/unlock in ppu atomic inctrustions to reduce redundancy
* Lock only once for dma transfers (non-TSX)
* Don't use RDTSC in reservation update logic
* Remove MFC cmd args passing to process_mfc_cmd
* Reorder check_state cpu_flag::memory check for faster unlocking
* Specialization for 128-byte data copy in SPU dma transfers
* Implement memory range locks and isolate PPU and SPU passive lock logic
This commit is contained in:
elad 2019-01-15 17:31:21 +02:00 committed by Ivan
parent f19fd23227
commit fc92ae4085
9 changed files with 344 additions and 235 deletions

View file

@ -119,15 +119,16 @@ bool cpu_thread::check_state()
while (true)
{
if (state & cpu_flag::memory && state.test_and_reset(cpu_flag::memory))
if (state & cpu_flag::memory)
{
cpu_flag_memory = true;
if (auto& ptr = vm::g_tls_locked)
{
ptr->compare_and_swap(this, nullptr);
ptr = nullptr;
}
cpu_flag_memory = true;
state -= cpu_flag::memory;
}
if (state & cpu_flag::exit + cpu_flag::dbg_global_stop)