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
asm.h Fix system time wraparound 2019-08-30 22:02:25 +03:00
AtomicPtr.h
BEType.h Improve to_se conversion template 2019-09-28 15:39:50 +03:00
bin_patch.cpp
bin_patch.h
bit_set.h
BitField.h
cfmt.h
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
Config.h Input: move some pad handler logic to the parent class 2019-09-24 21:09:24 +02:00
CPUStats.h
CRC.h
date_time.h
dynamic_library.cpp
dynamic_library.h
event.h
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
GSL.h
hash.h
Interval.h
JIT.cpp
JIT.h
lockless.h Fix lf_queue::wait 2019-09-13 23:52:18 +03:00
Log.cpp
Log.h Fix log format misuse 2019-10-09 02:14:52 +03:00
LUrlParser.cpp
LUrlParser.h
mutex.cpp
mutex.h Prioritize vip_lock in shared_mutex 2019-10-06 16:03:38 +03:00
rXml.cpp
rXml.h
sema.cpp
sema.h
StrFmt.cpp
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
sysinfo.h
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
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
version.h
VirtualMemory.cpp
VirtualMemory.h