Commit Graph

672 Commits

Author SHA1 Message Date
4700089325 Update meson.build
added build info for the new helper to modify /proc/sys values
2023-12-05 11:31:16 +00:00
c7a4572d73 Update gamemode.ini
added info about and default value for the setting to enable and disable split lock mitigation
2023-12-05 11:31:16 +00:00
7381d93c13 Update gamemode.rules.in
added policykit rules for a new helper to modify values in /proc/sys
2023-12-05 11:31:16 +00:00
97e588a5ad Update com.feralinteractive.GameMode.policy.in
added plociykit support for a new helper to write to /proc/sys
2023-12-05 11:31:16 +00:00
9a7ee00bbf Update gamemode-context.c
added support for disabling the kernel split lock mitigation when entering game mode
2023-12-05 11:31:16 +00:00
b2bd7e5919 Update gamemode-config.h
added config values for disabling split lock mitigation
2023-12-05 11:31:16 +00:00
97cee92d94 Update gamemode-config.c
added config value for disabling split lock mitigation
2023-12-05 11:31:16 +00:00
b9e8448afe Replace crypto mining reference with folding@home
Based on the change originally made by @joelsgp in PR #417, but there
were issues with the original commit message:
- Used an emoji which may cause rendering issues in CLI tools
- Mentioned Bitcoin mining which is inaccurate and contained
unnecessary censorship
2023-12-04 18:12:22 +00:00
6c197f9b70 Apply clang-format with the new include order 2023-12-04 17:00:20 +00:00
485a7f920a Move includes to the file that actually uses them
This was spotted thanks to clang-format reordering the includes.
Even with the new config, it will include the header file for the
current source file first. Nevertheless, it is best to always include
header files where they are needed.
2023-12-04 16:48:07 +00:00
f48c58f34c Update include order in .clang-format
We generally want system headers included above project ones.
In one case <linux/limits.h> needs to be above other system headers.
2023-12-04 16:42:15 +00:00
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
775c93001c [gamemode.ini] Add renice information about the user group. 2023-12-04 14:57:22 +00:00
160bf91665 Update README.md
Added game mode support for cemu (1bcdb35e42)
2023-12-04 14:54:05 +00:00
138ad384e3 Set the default GPU device ID to 0
This avoids confusion with the default configuration value being
`gpu_device=0` (as commented out in the `gamemode.ini` example),
but the actual default value being `-1`.

The alternative is to document this behavior and set the commented
out value to `-1`, but this makes the setup procedure more complex.
The new default behavior suits the 90% use case where there's
only one dedicated GPU available.
2023-12-04 14:21:32 +00:00
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
865ffb2588 reapply the core pinning from the reaper thread
Reapply the core pinning from the reaper thread to catch cases where the game launches threads after initial start
2023-12-04 14:18:38 +00:00
b83fb8f83e made pinning optionally silent
made core pinning optionally silent, used for when the reaper thread calls us repeatable so we don't create tons of unnecessary logs
2023-12-04 14:18:38 +00:00
e882505881 properly support config reloading 2023-12-04 14:18:38 +00:00
88a15aba86 properly support config reloading 2023-12-04 14:18:38 +00:00
9cb119be62 properly support config reloading 2023-12-04 14:18:38 +00:00
fd226e46ba added info about the parking/pinning capability 2023-12-04 14:18:38 +00:00
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
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
740a82a761 use defines instead of value
use defines instead of values for the park_or_pin variable
2023-12-04 14:18:38 +00:00
173a8594b4 fixed more coding style errors 2023-12-04 14:18:38 +00:00
81dc3f95e5 fixed more coding style errors 2023-12-04 14:18:38 +00:00
912d4bdc19 fixed more coding style errors 2023-12-04 14:18:38 +00:00
85b9abd654 fixed more coding style errors 2023-12-04 14:18:38 +00:00
2f7075b9c6 fix for clang-format 2023-12-04 14:18:38 +00:00
2e26331d97 fix to match clang-format 2023-12-04 14:18:38 +00:00
303a5a9734 fix to match clang-format 2023-12-04 14:18:38 +00:00
a9042199c6 fixed to match clang-format 2023-12-04 14:18:38 +00:00
3cabf9859d added info about suport for Intel E- and P-cores 2023-12-04 14:18:38 +00:00
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
ba1c593d0e added build info for cpucorectl
added build info for the new cpucorectl utility to meson
2023-12-04 14:18:38 +00:00
7d00c1f0a4 added cpucorectl.c
Added a utility to enable and disable cpu cores (aka core parking) since this requires root privileges
2023-12-04 14:18:38 +00:00
c070604a22 added cpu core parking/pinning settings to gamemode.ini
added some info about the new cpu core parking and pinning settings in gamemode.ini
2023-12-04 14:18:38 +00:00
dc2f7bbcd0 added polkit rules for cpucorectl
added polkit rules so we can run the cpucorectl utility without being root
2023-12-04 14:18:38 +00:00
437a129900 added polkit policy for cpucorectl
added the polkit policy for the cpucorectl utility so we can call it without being root
2023-12-04 14:18:38 +00:00
4997adef8d build gamemode-cpu
Added build info for gamemade-cpu.c to meson
2023-12-04 14:18:38 +00:00
1b10b679cd added the cpu core parking/pinning definitions
added the cpu core parking/pinning definitions to gamemode.h
2023-12-04 14:18:38 +00:00
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
2dbd565340 call the cpu core parking/pinning from context
call the cpu core parking/pinning from gamemode-context.c
2023-12-04 14:18:38 +00:00
01024927d2 added cpu core parking/pinning settings
added cpu core parking/pinning settings to gamemode-config.h
2023-12-04 14:18:38 +00:00
32a0b5b636 added the cpu core parking/pinning settings
added the cpu core parking/pinning settings to gamemode-config.c
2023-12-04 14:18:38 +00:00
520dc85ac3 updated meson.build to build common-cpu
added build info for common-cpu to meson
2023-12-04 14:18:38 +00:00
82206534dc Added common-cpu.c and common-cpu.h
Added common files for the cpu core parking/pinning functionality
2023-12-04 14:18:38 +00:00
1f28880509 Update copyright year and project list
PolyMC died and most of the active devs created a fork, Prism Launcher
2023-05-23 11:37:01 +01:00
8cfc345312 issue #384, #399
I have fixed the issues by implementing this change before running the script
2023-03-02 11:27:44 +00:00