1
0
mirror of https://github.com/RPCS3/rpcs3.git synced 2024-11-25 20:22:30 +01:00
rpcs3/Utilities
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
..
address_range.h Fix -Wsign-compare a little bit 2019-06-28 01:45:29 +03:00
asm.h Fix system time wraparound 2019-08-30 22:02:25 +03:00
AtomicPtr.h Implement waitable atomics 2019-07-29 03:04:55 +03:00
BEType.h Improve to_se conversion template 2019-09-28 15:39:50 +03:00
bin_patch.cpp Implement std::bit_cast<> 2019-06-02 23:22:16 +03:00
bin_patch.h Implement std::bit_cast<> 2019-06-02 23:22:16 +03:00
bit_set.h Implement waitable atomics 2019-07-29 03:04:55 +03:00
BitField.h rsx: Refactor rsx_decode.h and bugfixes 2019-07-09 11:52:34 +03:00
cfmt.h Correct get_int_t to get_uint_t. 2019-07-29 00:12:07 +03:00
cond.cpp Revert "Revert "Remove shared_cond and simplify reservation waiting"" 2019-09-24 05:01:00 +03:00
cond.h Revert "Revert "Remove shared_cond and simplify reservation waiting"" 2019-09-24 05:01:00 +03:00
Config.cpp Reintroduce LOG_CHANNEL 2018-08-25 15:39:00 +03:00
Config.h Input: move some pad handler logic to the parent class 2019-09-24 21:09:24 +02:00
CPUStats.h c++17: use std::size 2018-09-06 13:15:59 +03:00
CRC.h ds4: use controller calibration values for accel/gyro 2017-05-21 18:07:43 +03:00
date_time.h Screenshot function 2019-08-14 19:24:42 +02:00
dynamic_library.cpp Fix dynamic_library::loaded 2019-06-16 21:31:38 +03:00
dynamic_library.h Internal: register WaitOnAddress family functions (WinAPI) 2018-10-19 22:22:35 +03:00
event.h Implement waitable atomics 2019-07-29 03:04:55 +03:00
File.cpp Fix minor warning 2019-10-06 20:40:53 +03:00
File.h Make errors in Emu::Init verbose and don't crash 2019-09-24 05:01:00 +03:00
geometry.h rsx: Explicity describe transfer regions for both source and destination blocks 2019-10-04 18:10:46 +03:00
git-version-gen.cmd Git Revision Fix (#5043) 2018-08-27 22:53:45 +04:00
GSL.h Update GSL and yaml-cpp submodules 2018-08-25 01:15:47 +03:00
hash.h Add missing #includes to header files 2019-06-25 17:11:10 +03:00
Interval.h Add missing #includes to header files 2019-06-25 17:11:10 +03:00
JIT.cpp Implement cpu_thread::suspend_all 2019-06-19 20:36:12 +03:00
JIT.h Implement cpu_thread::suspend_all 2019-06-19 20:36:12 +03:00
lockless.h Fix lf_queue::wait 2019-09-13 23:52:18 +03:00
Log.cpp Use empty() instead of comparing size() with 0 2019-06-01 22:59:23 +03:00
Log.h Fix log format misuse 2019-10-09 02:14:52 +03:00
LUrlParser.cpp Add cross-platform implementation of cellHttpUtilParseUri 2017-09-04 00:37:36 +03:00
LUrlParser.h Add cross-platform implementation of cellHttpUtilParseUri 2017-09-04 00:37:36 +03:00
mutex.cpp Use atomic wait in shared_mutex and semaphore 2019-07-29 03:04:55 +03:00
mutex.h Prioritize vip_lock in shared_mutex 2019-10-06 16:03:38 +03:00
rXml.cpp Fix rXml limitation 2017-09-04 02:15:28 +03:00
rXml.h pugixml: update submodule and build integration 2018-06-24 02:02:36 +04:00
sema.cpp Use atomic wait in shared_mutex and semaphore 2019-07-29 03:04:55 +03:00
sema.h Implement waitable atomics 2019-07-29 03:04:55 +03:00
StrFmt.cpp Implement std::bit_cast<> 2019-06-02 23:22:16 +03:00
StrFmt.h StrFmt.h: remove some dead code with UB 2019-08-22 02:13:39 +03:00
StrUtil.h Improve strcpy_trunc 2019-09-21 03:59:43 +03:00
sync.h atomic.hpp: use native semaphores on Windows 2019-09-24 05:01:00 +03:00
sysinfo.cpp Add experimental TSC frequency detection 2019-07-15 17:20:12 +03:00
sysinfo.h Add experimental TSC frequency detection 2019-07-15 17:20:12 +03:00
Thread.cpp Use Linux timers for sleeps up to 1ms (#6697) 2019-10-09 20:03:34 +03:00
Thread.h Use Linux timers for sleeps up to 1ms (#6697) 2019-10-09 20:03:34 +03:00
Timer.h Add missing #includes to header files 2019-06-25 17:11:10 +03:00
typemap.h typeindices.hpp: add typeindex() helper 2019-09-19 02:16:14 +03:00
types.h Tidy endianness support (se_t) implementation 2019-09-28 15:39:50 +03:00
version.cpp EXCEPTION macro removed 2016-08-08 19:19:32 +03:00
version.h GUI logging improved 2016-07-21 01:54:39 +03:00
VirtualMemory.cpp Make vm::get_super_ptr return contiguous memory 2018-09-27 23:37:13 +03:00
VirtualMemory.h Add missing #includes to header files 2019-06-25 17:11:10 +03:00