Add support for 3D Cache Optimizer
Is your feature request related to a problem? Please describe. This is a native feature to change the preffered cores to the cache ones for 9950X3D, 9900X3D, 7950X3D and 7900X3D. The user needs to set in his BIOS the CPPC option to "driver"
Describe the solution you'd like If gamemode is used by the user, change the value to "cache". When gamemode stops, change it back to frequency
Describe alternatives you've considered There is currently already core pinning by gamemode, but the native version from AMD should be used.
Additional context The Driver will be merged together with the linux-pm merge with the 6.13 Kernel. Therefore check if the path is existent and then set the value.
More info: https://wiki.cachyos.org/configuration/general_system_tweaks/#5-amd-3d-v-cache-optimizer
This would likely need to build on https://github.com/FeralInteractive/gamemode/pull/416 from @HenrikHolst
A problem that I see with AMD:s solution is that is is system wide while the current GameMode solution allows the game to run on the cache side while the rest of the system is allowed to run on the frequency side. Now ofc most people probably don't do tons of background stuff when they are gaming so the AMD solution might be adequate for most people.
The benefit of the AMD solution would be for those cases where GameMode cannot fully manage all of the game:s threads (don't know if that is ever a case though).
This seems to be implemented now: #548
But the example use-case in the config mixes things up?
A lot of games perform better with the bigger cache, so I'd use it the other way round... (if toggling this at all. Might be best to always keep in cache mode with x3dmodectl)
amd_x3d_mode_default=cache may be ; preferred for some normal, non-game workloads that are better optimized for cache, but ; amd_x3d_mode_desired=frequency can shift everything but the game process to frequency CCD while GameMode is ; running, in conjunction with core pinning.
I agree with HenrikHolst above. I've been using my own setuid scripts to set x3d mode since before gamemode supported this feature. In my experience, pinning cores is better than changing the scheduling priority globally.
I think it's because on my 7950x3d, the default preference on frequency cores 8-15 means all the tasks that are not the game prefer that chiplet, leaving the cache chiplet on cores 0-7 almost exclusively to the game.
The only improvement I'd like to see in this area is to make core pinning dynamic. Ideally, I'd like to see gamemode stick my workload in a cgroup and monitor its cpu.stat's usage_usec. If the workload is close to maxing out the pinned cores, start adding distant cores (from the frequency CCD) to the pinned cores list. And take away the frequency-optimized cores if the workload hasn't needed them in a longer while.
This way, games that can use >8 cores would not be restricted by the static pinning while still preferentially filling up the cache CCD first.