rpcsx/rpcs3/Emu/Cell/lv2
plappermaul 925f2ce02f Use Linux timers for sleeps up to 1ms (#6697)
* Use Linux timers for sleeps up to 1ms (v3)
The current sleep timer implementation basically offers two variants. Either
wait the specified time exactly with a condition variable (as host) or use a
combination of it with a thread yielding busy loop afterwards (usleep timer).

While the second one is very precise it consumes CPU loops for each wait call
below 50us. Games like Bomberman Ultra spam 30us waits and the emulator hogs
low power CPUs. Switching to host mode reduces CPU consumption but gives a
~50us penalty for each wait call. Thus extending all sleeps by a factor of
more than two.

The following bugfix tries to improve the system timer for Linux by using
Linux native timers for small wait calls below 1ms. This has two effects.

- Host wait setting has much less wait overhead
- usleep wait setting produces lower CPU overhead
2019-10-09 20:03:34 +03:00
..
lv2.cpp Fix sys_cond_wait 2019-08-27 15:13:01 +03:00
sys_cond.cpp Fix verification failure on Emu.Stop() at sys_cond_wait 2019-10-08 23:12:34 +03:00
sys_cond.h Revert incorrect usage of le_t in name_u64 2019-07-09 12:07:58 +03:00
sys_config.cpp Use g_fxo for lv2_config 2019-08-27 03:50:15 +03:00
sys_config.h Finally remove fxm from IdManager 2019-09-26 23:26:36 +03:00
sys_dbg.cpp Remove unnecessary header includes 2019-06-25 17:11:10 +03:00
sys_dbg.h Split Emu/Memory into more logical headers 2019-06-25 17:11:10 +03:00
sys_event.cpp Revert PR 6405 2019-08-27 14:05:38 +03:00
sys_event.h sys_event: add vm::temporary_unlock 2019-07-14 18:06:02 +03:00
sys_event_flag.cpp Revert PR 6405 2019-08-27 14:05:38 +03:00
sys_event_flag.h sys_event_flag: add vm::temporary_unlock 2019-07-14 17:37:58 +03:00
sys_fs.cpp Improve vfs::host::unlink on Windows (for sys_fs_rmdir) 2019-09-25 18:47:38 +03:00
sys_fs.h Add missing #includes to header files 2019-06-25 17:11:10 +03:00
sys_gamepad.cpp Remove unnecessary header includes 2019-06-25 17:11:10 +03:00
sys_gamepad.h Split Emu/Memory into more logical headers 2019-06-25 17:11:10 +03:00
sys_gpio.cpp sys_gpio Cleanup 2019-10-08 02:52:33 +03:00
sys_gpio.h sys_gpio Cleanup 2019-10-08 02:52:33 +03:00
sys_interrupt.cpp Avoid using _sys_ppu_thread_exit in _sys_interrupt_thread_disestablish 2019-08-13 04:56:00 +03:00
sys_interrupt.h sys_interrupt: add vm::temporary_unlock 2019-07-14 18:08:18 +03:00
sys_lwcond.cpp Put lv2_obj::awake calls under mutex 2019-08-29 02:44:12 +03:00
sys_lwcond.h sys_lwcond: Extract protocol from lwmutex at creation 2019-07-29 21:58:04 +03:00
sys_lwmutex.cpp Put lv2_obj::awake calls under mutex 2019-08-29 02:44:12 +03:00
sys_lwmutex.h Revert incorrect usage of le_t in name_u64 2019-07-09 12:07:58 +03:00
sys_memory.cpp Use g_fxo for global lv2_memory_container 2019-09-18 21:24:04 +03:00
sys_memory.h Fix max allocations for DECR mode (sys_memory) 2019-08-11 21:43:13 +03:00
sys_mmapper.cpp Use g_fxo for global lv2_memory_container 2019-09-18 21:24:04 +03:00
sys_mmapper.h Use g_fxo for global lv2_memory_container 2019-09-18 21:24:04 +03:00
sys_mutex.cpp Revert PR 6405 2019-08-27 14:05:38 +03:00
sys_mutex.h Revert incorrect usage of le_t in name_u64 2019-07-09 12:07:58 +03:00
sys_net.cpp Use g_fxo for network thread 2019-10-08 23:12:54 +03:00
sys_net.h Add missing #includes to header files 2019-06-25 17:11:10 +03:00
sys_overlay.cpp Use g_fxo for LoadedNpdrmKeys_t 2019-08-22 02:13:39 +03:00
sys_overlay.h vm/sys_overlay Improvements 2019-07-28 14:23:58 +03:00
sys_ppu_thread.cpp Use g_fxo for page_fault_event_entries 2019-08-22 02:13:39 +03:00
sys_ppu_thread.h Split Emu/Memory into more logical headers 2019-06-25 17:11:10 +03:00
sys_process.cpp Use g_fxo for LoadedNpdrmKeys_t 2019-08-22 02:13:39 +03:00
sys_process.h vm/sys_overlay Improvements 2019-07-28 14:23:58 +03:00
sys_prx.cpp Use g_fxo for LoadedNpdrmKeys_t 2019-08-22 02:13:39 +03:00
sys_prx.h vm/sys_overlay Improvements 2019-07-28 14:23:58 +03:00
sys_rsx.cpp rsx: Default initailize zcull reports padding 2019-10-05 15:00:50 +03:00
sys_rsx.h Use g_fxo for SysRsxConfig 2019-08-27 03:50:15 +03:00
sys_rwlock.cpp Revert PR 6405 2019-08-27 14:05:38 +03:00
sys_rwlock.h sys_rwlock: add vm::temporary_unlock 2019-07-14 18:14:15 +03:00
sys_semaphore.cpp Revert PR 6405 2019-08-27 14:05:38 +03:00
sys_semaphore.h sys_semaphore: add vm::temporary_unlock 2019-07-14 18:18:03 +03:00
sys_spu.cpp Use g_fxo for patch_engine 2019-08-27 03:50:15 +03:00
sys_spu.h Implement lv2_spu_image 2019-08-16 23:49:24 +03:00
sys_ss.cpp Remove unnecessary header includes 2019-06-25 17:11:10 +03:00
sys_ss.h Add missing #includes to header files 2019-06-25 17:11:10 +03:00
sys_sync.h Use Linux timers for sleeps up to 1ms (#6697) 2019-10-09 20:03:34 +03:00
sys_time.cpp Fix system time wraparound 2019-08-30 22:02:25 +03:00
sys_time.h Split Emu/Memory into more logical headers 2019-06-25 17:11:10 +03:00
sys_timer.cpp perf hotfix for sys_timer_usleep 2019-08-01 23:38:09 +03:00
sys_timer.h sys_timer: add vm::temporary_unlock 2019-07-14 18:21:56 +03:00
sys_trace.cpp Stub sys_process_get_number_of_object(object == SYS_TRACE_OBJECT) 2019-08-16 23:49:24 +03:00
sys_trace.h Add missing #includes to header files 2019-06-25 17:11:10 +03:00
sys_tty.cpp Use empty() instead of comparing size() with 0 2019-06-01 22:59:23 +03:00
sys_tty.h Split Emu/Memory into more logical headers 2019-06-25 17:11:10 +03:00
sys_usbd.cpp Only free the list if libusb_get_device_list succeeded 2019-09-25 01:07:04 +03:00
sys_usbd.h Implement sys_usbd_event_port_send 2019-09-24 09:18:33 +02:00
sys_vm.cpp Use g_fxo for global lv2_memory_container 2019-09-18 21:24:04 +03:00
sys_vm.h Use g_fxo for global lv2_memory_container 2019-09-18 21:24:04 +03:00