Ahsan Fayaz
6c197f9b70
Apply clang-format with the new include order
2023-12-04 17:00:20 +00:00
Ahsan Fayaz
fad889db45
Apply clang-format to CPU pinning and parking code
...
The original PR #416 failed the format check, but this wasn't apparent
until after merging.
2023-12-04 15:33:15 +00:00
Henrik Holst
9614ceca9b
pin every thread of the process
...
walk through /proc/pid/task to make sure that we set the thread affinity for every single thread in the process
2023-12-04 14:18:38 +00:00
Henrik Holst
88a15aba86
properly support config reloading
2023-12-04 14:18:38 +00:00
Henrik Holst
91eb57574c
fixed double free on exit from non use
...
if cpu core parking/pinning was disabled by the logic then there would be a double free at exit
2023-12-04 14:18:38 +00:00
Henrik Holst
25a99af4a1
use define instead of value
...
use a define instead of values for the park_or_pin variable
2023-12-04 14:18:38 +00:00
Henrik Holst
81dc3f95e5
fixed more coding style errors
2023-12-04 14:18:38 +00:00
Henrik Holst
912d4bdc19
fixed more coding style errors
2023-12-04 14:18:38 +00:00
Henrik Holst
2e26331d97
fix to match clang-format
2023-12-04 14:18:38 +00:00
Henrik Holst
51ee251efb
Added detection for big.LITTLE
...
Added detection for big.LITTLE aka cpu:s where not all cores have the same frequency like on Intel Alder Lake and newer. The current logic allows a 5% difference in the max frequency due to some reports that those cpu:s doesn't always give back the exact same value (possible due to boosting capability).
2023-12-04 14:18:38 +00:00
Henrik Holst
495a659895
Added gamemode-cpu.c
...
Added gamemode-cpu.c which contains the functions for cpu core parking and pinning
2023-12-04 14:18:38 +00:00